id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

fiveSumFromZeroToN


Write a function that returns the sum of the values between 0 and the parameter n, but only include multiples of 5. When n is negative, return 0.


fiveSumFromZeroToN(0) → 0
fiveSumFromZeroToN(10) → 15
fiveSumFromZeroToN(33) → 105

...Save, Compile, Run (ctrl-enter)

def fiveSumFromZeroToN(n):

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Python Help

Difficulty: 5

Copyright Nick Parlante 2017 - privacy