python
beginner
हल किया
2026-11-17 को समाप्त
FizzBuzz, the honest way
Write fizzbuzz(n) that returns a list of strings for the numbers 1 to n:
- multiples of 3 become
"Fizz" - multiples of 5 become
"Buzz" - multiples of both become
"FizzBuzz" - every other number becomes its digits as text, e.g.
"7"
Acceptance criteria
fizzbuzz(0)returns an empty list.- Return the list; don't print inside the function.
- Run the code: the tests at the bottom must print
All tests passed.
अब तक 0 लोगों ने हल किया।
एडिटरCtrl + Enter
जब टेस्ट "All tests passed" दिखाते हैं, तो चैलेंज इस ब्राउज़र में हल के रूप में चिह्नित हो जाता है।
अपना समाधान समीक्षा के लिए भेजें