From 519720e0bbb655f810d687b6655002b304072814 Mon Sep 17 00:00:00 2001 From: DECY RYNOLDS MAYELA <116128941+Rynolds266@users.noreply.github.com> Date: Sat, 2 Nov 2024 04:47:58 -0400 Subject: [PATCH 1/2] fizzbuzz python code added --- fizzbuzz.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/fizzbuzz.py b/fizzbuzz.py index 218f7aa..1fdb84b 100644 --- a/fizzbuzz.py +++ b/fizzbuzz.py @@ -1,2 +1,26 @@ # add your code here +def Fizz_Buzz(number): + + number = int(input('Enter your numner here: ')) + + for x in range ( 1, number + 1 ): + + if x % 3 == 0 and x % 5 == 0: + + print('FizzBuzz') + + elif x % 3 == 0 : + + print('Fizz') + + elif x % 5 == 0 : + + print('Buzz') + + else: + + print('x') + + +Fizz_Buzz(number='') From e8997294e0009bcaba0484669be93e00641725cb Mon Sep 17 00:00:00 2001 From: DECY RYNOLDS MAYELA <116128941+Rynolds266@users.noreply.github.com> Date: Sat, 2 Nov 2024 05:07:41 -0400 Subject: [PATCH 2/2] Update fizzbuzz.py --- fizzbuzz.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fizzbuzz.py b/fizzbuzz.py index 1fdb84b..4b916ac 100644 --- a/fizzbuzz.py +++ b/fizzbuzz.py @@ -20,7 +20,7 @@ def Fizz_Buzz(number): else: - print('x') + print(x) Fizz_Buzz(number='')