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

 

konstans@stuy.edu > fizzbuzz
prev  |  next  |  chance

Return a value based on n. When N is a multiple of 3 return "Fizz", when it is a multiple of 5 return "Buzz". Finally when n is a multiples of both 3 and 5 become "FizzBuzz". In all other cases return the original number.


fizzbuzz(1) → 1
fizzbuzz(2) → 2
fizzbuzz(31) → 31

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

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