From b0a41fb1acabc9bb584c7d71dd10b29648b14725 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 3 Nov 2024 20:12:40 -0500 Subject: [PATCH] Code for FizzBuzz Assignment --- fizzbuzz.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/fizzbuzz.py b/fizzbuzz.py index 218f7aa..9b309e0 100644 --- a/fizzbuzz.py +++ b/fizzbuzz.py @@ -1,2 +1,16 @@ -# add your code here +#FizzBuzz Challenge +for number in range(101): + + eval = "" + + if number % 3 == 0: + eval = eval + "Fizz" + + if number % 5 == 0: + eval = eval + "Buzz" + + if number % 3 != 0 and number % 5 != 0: + eval = eval + str(number) + + print(eval) \ No newline at end of file