Sum of every prime number below n

Created by Julien Palard

Write a sum_primes function returning the sum of every prime number strictly inferior to its single parameter.

Example

>>> sum_primes(10)
17

Advice

You may copy/paste your is_prime function from a previous exercise ;)

There's no corrections yet, hit the `Submit` button to send your code to the correction bot.

Keyboard shortcuts:

  • Ctrl-Enter: Send your code to the correction bot.
  • Escape: Get back to the instructions tab.

See solutions