subject
Computers and Technology, 18.02.2020 00:03 jaz279

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

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 20:00
What is the term for water wave that is created by an underwater earthquake
Answers: 1
question
Computers and Technology, 22.06.2019 21:50
Given int variables k and total that have already been declared, use a while loop to compute the sum of the squares of the first 50 counting numbers, and store this value in total. thus your code should put 11 + 22 + 33 + + 4949 + 50*50 into total. use no variables other than k and total.
Answers: 2
question
Computers and Technology, 23.06.2019 03:00
What are the different parts of computer
Answers: 2
question
Computers and Technology, 24.06.2019 06:00
Hey i really need some solving this problem: 1. encrypt this binary string into cipher text: 110000. include in your answer the formula the decoder would use to decrypt your cipher text in the format (coded answer) x n mod (m) = y & 2. decrypt this cipher text into a binary string: 106 you.
Answers: 2
You know the right answer?
Fill in the blanks to make the print_prime_factors function print all the prime factors of a number...
Questions
question
Physics, 30.11.2020 01:00
question
Mathematics, 30.11.2020 01:00
question
Mathematics, 30.11.2020 01:00
question
Mathematics, 30.11.2020 01:00
question
Mathematics, 30.11.2020 01:00