Skip to content

Commit cf6c338

Browse files
final 12. Exercise >> I ahve to go back to pythonDr AngelaYu
1 parent 688018c commit cf6c338

File tree

1 file changed

+44
-12
lines changed

1 file changed

+44
-12
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,47 @@
11
# 12. Exercise
22

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")
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)
16+
17+
18+
#
19+
def Fizz_Buzz(x_value):
20+
# int(input("Value is "))
21+
if (x_value % 3 == 0) and (x_value % 5):
22+
return "Fizz Buzz "
23+
if x_value % 3 == 0:
24+
return "Fizz"
25+
if x_value %5 ==0:
26+
return "Buzz"
27+
print(Fizz_Buzz(15))
28+
29+
30+
# redef this function
31+
def fezzo_buzzo(val):
32+
if val % 3 == 0 and val % 5 == 0:
33+
# division By %3 and %5 and
34+
print("FIZZyBuzz")
35+
elif val % 5 == 0:
36+
# Division By %5
37+
print("BUZZ")
38+
elif val % 3 == 0:
39+
# Divison By 3
40+
print("FIZZ")
1141
else:
12-
print("Wrong Entry ")
13-
while fizz_buzz(value="")is True:
14-
continue
15-
fizz_buzz(15)
42+
print(val)
43+
44+
fezzo_buzzo(15)
45+
46+
47+
# These 2 example

0 commit comments

Comments
 (0)