sum of prime numbers python program?
Write a function sum_primes(N) that adds all the prime numbers (that is: integers that are only divisible by 1 and themselves) between 1 and argument N and returns the result. Write a program that asks the user to enter a number Q and prints onto the console the sum of all prime numbers up to Q, using the sum_primes() function.
can someone answer this for me please
- brilliant_movesLv 71 month ago
Hi, Adriana. Have you had a go at coding this? I suggest you simplify: start by writing a program that determines whether or not a number is prime. That would be a good building block to start with. Can you do that?
- RichardLv 71 month ago
This is WAY too long to answer on Yahoo Answers. Anyways, what computer language or software do you want to use?