BetaUnder construction. Questions are being reviewed by teachers — enjoy the free practice in the meantime.
Python basics · Exercise
FizzBuzz value
Write a function fizzbuzz_value(n) used in a counting game. It returns: 'FizzBuzz' if n is divisible by both 3 and 5, 'Fizz' if n is divisible by 3 only, 'Buzz' if n is divisible by 5 only, and otherwise the number itself as a string (for example '7'). Hint: Order matters: check 'divisible by both' before checking each one on its own.