From c3f5ee6153fba717828544c044605084ed435431 Mon Sep 17 00:00:00 2001 From: Andrea Thompson Date: Sun, 27 Oct 2024 23:04:32 -0400 Subject: [PATCH 1/2] First --- fizzbuzz.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/fizzbuzz.py b/fizzbuzz.py index 218f7aa..435fd60 100644 --- a/fizzbuzz.py +++ b/fizzbuzz.py @@ -1,2 +1,11 @@ -# add your code here + +for i in range (1,101): + if i % 3 == 0: + if i % 5 ==0: + print ("FizzBuzz") + print("Fizz") + elif i % 5 == 0: + print("Buzz") + else: + print(i) From 2dc90474f2a866ac48660ff8ca50194b5b8eedd1 Mon Sep 17 00:00:00 2001 From: Andrea Thompson Date: Sat, 2 Nov 2024 19:17:52 -0400 Subject: [PATCH 2/2] Edited --- fizzbuzz.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fizzbuzz.py b/fizzbuzz.py index 435fd60..5d63d5f 100644 --- a/fizzbuzz.py +++ b/fizzbuzz.py @@ -1,8 +1,8 @@ for i in range (1,101): - if i % 3 == 0: - if i % 5 ==0: - print ("FizzBuzz") + if i % 3 == 0 and i % 5 ==0: + print ("FizzBuzz") + elif i % 3 == 0: print("Fizz") elif i % 5 == 0: print("Buzz")