G

Untitled

public
Guest May 09, 2025 Never 24
Clone
Plaintext paste1.txt 67 lines (58 loc) | 2.12 KB
1
import time
2
3
def print_pause(message):
4
print(message)
5
time.sleep(2)
6
7
def get_choice():
8
while True:
9
choice = input("(Please enter 1 or 2): ")
10
if choice == "1" or choice == "2":
11
return choice
12
else:
13
print("Invalid input. Please enter 1 or 2.")
14
15
def kitchen():
16
print_pause("You find an old man.")
17
print_pause("He gives you a box.")
18
print_pause("What would you like to do?")
19
print_pause("Enter 1 to take the box.")
20
print_pause("Enter 2 to refuse it.")
21
choice = get_choice()
22
if choice == "1":
23
print_pause("You open it with your key and you win!! 🎉")
24
else:
25
print_pause("The old man kills you. You lose!! 💀")
26
27
def caffe():
28
print_pause("You enter the café. It is empty.")
29
print_pause("You hear a sound coming from the kitchen.")
30
print_pause("What would you like to do?")
31
print_pause("Enter 1 to go to the kitchen.")
32
print_pause("Enter 2 to leave the café.")
33
choice = get_choice()
34
if choice == "1":
35
kitchen()
36
else:
37
print_pause("You leave the café.")
38
39
def bathroom():
40
print_pause("You hear a sound.")
41
print_pause("What would you like to do?")
42
print_pause("Enter 1 to follow the sound.")
43
print_pause("Enter 2 to leave the bathroom.")
44
choice = get_choice()
45
if choice == "1":
46
print_pause("You find a song box. It's a treasure! You win!! ")
47
else:
48
print_pause("A puck kills you. You lose!! ")
49
50
def start_game():
51
print_pause("You find yourself standing in the sea, the beach is empty, the water is clear.")
52
print_pause("Rumor has it that there is an evil mermaid who has been killing everyone who comes to the beach.")
53
print_pause("In front of you is a café.")
54
print_pause("To your right is a bathroom.")
55
print_pause("In your hand is a key.")
56
57
print_pause("Enter 1 to go to the café.")
58
print_pause("Enter 2 to go to the bathroom.")
59
print_pause("What would you like to do?")
60
61
choice = get_choice()
62
if choice == "1":
63
caffe()
64
else:
65
bathroom()
66
67
start_game()