Ask your own question, for FREE!
Computer Science 8 Online
OpenStudy (littlebird):

Assume the availability of a function is_prime. Assume a variable n has been associated with positive integer. Write the statements needed to compute the sum of the first n prime numbers. The sum should be associated with the variable total.

OpenStudy (littlebird):

total=0 number = 0 n = 1 while number <= n: if is_prime(n) == True: total += n break (my attempt)

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!