Skip to content

Commit

Permalink
Merge pull request #1865 from nikitapandeyy/patch-6
Browse files Browse the repository at this point in the history
Update FizzBuzz.py
  • Loading branch information
geekcomputers authored Jul 15, 2023
2 parents 150b0e4 + 12b4866 commit 48a8974
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions FizzBuzz.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
# If none of the given conditions are true then just print the number!


def FizzBuzz():
num = int(input("Enter the number here: "))
def FizzBuzz(num):
for i in range(1, num + 1):
if i % 3 == 0 and i % 5 == 0:
print("FizzBuzz")
Expand All @@ -19,4 +18,5 @@ def FizzBuzz():
print(i)


FizzBuzz()

FizzBuzz(20) # prints FizzBuzz up to 20

0 comments on commit 48a8974

Please sign in to comment.