I have code:
a = int(input("Type a integer:"))
temp = []
while a != 1:
---> for i in range(2, a):
if a % i == 0:
temp.append(i)
a = a / i
break
print(temp)
I typed 60 and then it gives the error: TypeError: 'float' object cannot be interpreted as an integer.
However, I checked:
a = int(input("Type a integer"))
type(a)
It shows type of a is int.
If so, where is the float type comes from?
awill become a float if it's not divisible byi(creating fractional parts).a = a // iif you want integer division