Skip to content

Commit 688018c

Browse files
# 12. Exercise
1 parent c254b5d commit 688018c

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

100 Day In Python by Dr. Angela Yu/5--Day(#5) - Beginner - Python Loops/007 [Interactive Coding Exercise] The FizzBuzz Job Interview Question.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# FIZZBUZZ
22
total = 0
33
for val in range(1, 101):
4-
# Range of our programm
4+
# Range of our program
55
if val % 3 == 0 and val % 5 == 0:
66
# division By %3 and %5 and
77
print("FIZZyBuzz")
88
elif val % 5 == 0:
9-
# DIvision By %5
9+
# Division By %5
1010
print("BUZZ")
1111
elif val % 3 == 0:
1212
# Divison By 3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# 11. Tips and Tricks
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# 12. Exercise
2+
3+
def fizz_buzz(value):
4+
value=int(input("your value is : "))
5+
if value % 3 == 0 and value % 5 == 0:
6+
print("fizz Buzz")
7+
elif value %5 ==0:
8+
print("buzz")
9+
elif value %3 ==0:
10+
print("fizz")
11+
else:
12+
print("Wrong Entry ")
13+
while fizz_buzz(value="")is True:
14+
continue
15+
fizz_buzz(15)

0 commit comments

Comments
 (0)