how is the same code working? click hereQuestion The question asks to create a function which returns the prime factors of a given number, given as a output Probelem It returns the string "Done" instead of the prime factors of the given number What I've tried I've tried defining the function and had also provided the code I wrote
Code
def prime_factors(number):
factor = 2
while number <= factor:
if number % factor == 0:
print(factor)
number = number / factor
else:
factor += 1
return "Done"
prime_factors(100)