From f06c747849f6b8846446b979fce0502fb96c1ae6 Mon Sep 17 00:00:00 2001 From: Gitty-Code Date: Mon, 4 Nov 2024 10:05:27 -0500 Subject: [PATCH] Add files via upload --- fizzbuzz.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/fizzbuzz.py b/fizzbuzz.py index 218f7aa..8c008ad 100644 --- a/fizzbuzz.py +++ b/fizzbuzz.py @@ -1,2 +1,12 @@ # add your code here - +FizzBuzz Challenege +# looping numbers in range 1-100 +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) # Print the number if it's not divisible by 3 or 5