-
Notifications
You must be signed in to change notification settings - Fork 100
/
tea.py
47 lines (39 loc) · 994 Bytes
/
tea.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
#tea making simulator
import time
def boil_water():
print("Boiling water...")
time.sleep(3)
print("Water is boiling.")
def add_teabag():
print("Adding a tea bag...")
time.sleep(2)
print("Tea bag added.")
def steep_tea():
print("Steeping the tea...")
time.sleep(3)
print("Tea is ready.")
def add_milk_and_sugar():
print("Adding milk and sugar...")
time.sleep(2)
print("Tea is now ready to drink.")
def make_tea():
boil_water()
add_teabag()
steep_tea()
add_milk_and_sugar()
def main():
print("Welcome to the Tea Making Simulator!")
while True:
print("\nOptions:")
print("1. Make tea")
print("2. Quit")
choice = input("Enter your choice (1 or 2): ")
if choice == '1':
make_tea()
elif choice == '2':
print("Goodbye!")
break
else:
print("Invalid choice. Please enter 1 or 2.")
if __name__ == "__main__":
main()