-2
def primo(b, d):
d = 0
c = 1
x = 0
while c < b+1:
if b % c == 0:
x += 1
c +=1
if x == 2:
d = 1
return d
d = 0
c = []
b = 3
a = int(input ("coloque o número que você quer que seja 'fatorado': "))
while a > 1:
d = 0
if a % 2 == 0:
a = a / 2
int(a)
c.append("2x")
print (a)
else:
primo(b, d)
if d == 1:
print (d)
c.append(b, "x")
a = a /b
b = 3
else:
b +=1
print (c)
primo(b, d)
should not be assigned to some variable?– Cmte Cardeal