Fill in the blanks to make the print_prime_factors function print all the prime factors of a number prime factor is a number that is prime and divides another without a remainder.
def print_prime_factors(number):
# Start with two, which is the first prime
factor = 2
# Keep going until the factor is larger than the number
while factor <= number:
# Check if factor is a divisor of number
if number % factor == ___:
# If it is, print it and divide the original number
print(factor)
number = number / factor
else:
# If it's not, increment the factor by one ___
return "Done"
print_prime_factors(100) # Should print 2,2,5,5

Respuesta :

The answer & explanation for this question is given in the attachment below.

Ver imagen ammary456

The blank space need to be filled with 0 to make the print_prime_factors function print all the prime factors of a number.

The appropriate code is represented as follows:

def print_prime_factors(number):

  factor = 2

  while factor <= number:

     if number % factor == 0:

        print(factor)

        number = number / factor

     else:

        factor+=1

print_prime_factors(100)  ) # Should print 2,2,5,5

A function is declared called print_prime_factors and the arguement is number.

The variable factor is initialise with 2.

While factor is less than or equals to number.

If number divided by the factor has no remainder then print the factor.

Then divide the number by factor.

Else

Add 1 to the factor.

learn more on python here; https://brainly.com/question/14786286?referrer=searchResults

Ver imagen vintechnology