-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproject DECI.py
More file actions
79 lines (63 loc) · 2.42 KB
/
Copy pathproject DECI.py
File metadata and controls
79 lines (63 loc) · 2.42 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
def game():
import time
import random
def print_pause(text,t):
print(text)
time.sleep(t)
vehicles = ["Motorcycle","car","truck"]
the_vehicle = random.choice(vehicles)
chased = ["criminals","Gang","Drug dealers"]
the_chased = random.choice(chased)
print_pause("We are being chased by "+the_chased+", and you are driving a "+the_vehicle+",and you must choose our way to escape",2)
print_pause("You have to choose from three ways",2)
print_pause("The first way to the port of ships, the second way out of town,the third way you don't know",2)
print_pause("choose1,2,3",1)
#story
num = int(input("enter your way namber: "))
#input
if num == 1:
def way_one():
print_pause("Oh, end of the road now we're at the port, what do you want us to do?",2)
decision = input("hide or fight:")
if decision == "hide":
print_pause("Oh,we survived",1)
print("we win")
elif decision == "fight":
print_pause("We died, you haven't weapons",1)
print("We fail")
else :
print("please check your input")
way_one()
way_one()
elif num == 2:
def way_two():
print_pause("We are in a race now",2)
print_pause("Oh no,Gasoline is almost gone",2)
print_pause("what do you want us to do?",2)
choose = input("continue or plan B:")
if choose == "continue":
print("gasoline is gone and The "+the_chased+" caught us")
elif choose == "plan B":
print("We don't have a plan B")
else :
print("please check your input")
way_two()
way_two()
elif num == 3:
print_pause("Oh,polis station",2)
print_pause("criminals can't follow us",2)
print("we win")
else :
print("please check your input")
def end():
try_again = input("if you want play again enter yes, if you wantn't enter no:")
if try_again == "yes":
game()
elif try_again == "no":
print("Bye,have a nice day")
else:
print("please check your input")
end()
end()
# if conditions
game()