From 0670ecbd6a39c7165f011647972f094a063a1775 Mon Sep 17 00:00:00 2001 From: nebulos007 <164109624+nebulos007@users.noreply.github.com> Date: Mon, 4 Nov 2024 02:08:15 +0000 Subject: [PATCH] added fizzbuzz code --- fizzbuzz.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/fizzbuzz.py b/fizzbuzz.py index 218f7aa..b3b36d1 100644 --- a/fizzbuzz.py +++ b/fizzbuzz.py @@ -1,2 +1,11 @@ # add your code here +for num in range(1, 101): + if num % 3 == 0 and num % 5 == 0: + print("FizzBuzz") + elif num % 3 == 0: + print("Fizz") + elif num % 5 == 0: + print("Buzz") + else: + print(num)