We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ab8064b commit 9924997Copy full SHA for 9924997
Day1/Python3/keivalya_FizzBuzz.py
@@ -0,0 +1,18 @@
1
+'''
2
+ *author: keivalya
3
+ *date: 25-09-2020
4
5
+
6
+print("******FIZZBUZZ******")
7
+n = int(input("Enter limit for number of digits: "))
8
9
+for i in range(1, n+1):
10
+ final = "" # initialization, for later we can simply append another string to it
11
+ if i%3 == 0 :
12
+ final = "Fizz" # contition for when divided by 3, remainder is zero
13
+ if i%5 == 0:
14
+ final += "Buzz" # similar confition for 5
15
+ if final :
16
+ print(final) # when both conditions satisfy
17
+ else:
18
+ print(i) # when no condition is satisfied
0 commit comments