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

 

konstans@stuy.edu all > specialSumInclusive
prev  |  next  |  chance

Write a function that calculates the sum of all of the numbers between 0 and the parameter n. Only the values that are multiples of 5 or multiples of 3 are counted. 3 5 6 9 10 12 15...


specialSumInclusive(0) → 0
specialSumInclusive(3) → 3
specialSumInclusive(5) → 8

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

def specialSumInclusive(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

Copyright Nick Parlante 2017 - privacy