-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path07_ifElseNesting.py
67 lines (59 loc) · 1.95 KB
/
07_ifElseNesting.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Day 7 on replit
# Fix my code section
# order = input(What would you like to order: pizza or hamburger? ")
# if order = "hamburger":
# print("Thank you.")
# cheese = input("Do you want cheese?")
# if cheese == "yes":
# print("You got it.")
# else:
# print("No cheese it is.")
# elif order == pizza:
# print("Pizza coming up.")
# toppings = input("Do you want pepperoni on that?")
# if toppings = "yes"
# print("We will add pepperoni.")
# else:
# print"Your pizza will not have pepperoni.")
order = input("What would you like to order: pizza or hamburger? ")
if order == "hamburger":
print("Thank you.")
cheese = input("Do you want cheese?")
if cheese == "yes":
print("You got it.")
else:
print("No cheese it is.")
elif order == "pizza":
print("Pizza coming up.")
toppings = input("Do you want pepperoni on that?")
if toppings == "yes":
print("We will add pepperoni.")
else:
print("Your pizza will not have pepperoni.")
# Day 7 challenge
print("Fake Fan Finder")
print("---------------")
favouriteAnime = input("What is your favourite Anime? ")
if favouriteAnime == "dbz":
print("Oh wow! I love dbz too")
favouriteCharacter = input("But wait, what is your favourite character?")
if favouriteCharacter == "Goku":
print("Same here")
randomQuestion = input("What's Goku's wife's name? ")
if randomQuestion == "Chi Chi":
print("You´re a real fan")
else:
print("You´re a fake fan")
elif favouriteCharacter == "Vegeta":
print("It´s a valid option too")
randomQuestion = "What's the highest Super Saiyan level attained by Vegeta in DBZ? "
if randomQuestion == "Super Saiyan 2":
print("You´re a real fan")
else:
print("You´re a fake fan")
else:
randomQuestion = input("What item is used to restore health? ")
if randomQuestion == "Senzu bean":
print("You´re a real fan")
else:
print("You´re a fake fan")