-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtesla_profess.py
94 lines (72 loc) · 2.75 KB
/
tesla_profess.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#how does a basic tesla work
#info
r_name = str(input("give the registered drivers name for you tesla : "))
#controls
ava_comnds = {
"reverse" : False,
"accelerate" : False,
"push_glass_left_front" : False,
"push_glass_right_front" : False,
"push_glass_left_back" : False,
"push_glass_right_back" : False,
"consolidater_push_glass" : False,
"overhead_shade" : False,
"door_front_right" : False,
"door_front_left" : False,
"door_back_right" : False,
"door_back_left" : False,
"consolidater_door" : False,
"trunk" : False,
"frunk" : False,
"consolidater_trunk" : False,
}
idt = lambda x, y: print("{0} has been {1} succesfully".format(x, y))
epicenter = str(input(F"hey {r_name} press y to turn open the car : ")).casefold()
if epicenter == "y":
while True:
command = str(input("""
reverse
accelerate
push_glass_left_front
push_glass_right_front
push_glass_left_back
push_glass_right_back
consolidater_push_glass
overhead_shade
door_front_right
door_front_left
door_back_right
door_back_left
consolidater_door
trunk
frunk
consolidater_trunk
enter the instument to be used or input 'end' to close your tesla : """)).casefold()
if command in ava_comnds.keys():
orc = str(input(F"""enter open or close to make the suitable actions for the {command}: """)).casefold()
if orc in ("open", "close"):
if orc == "open":
if ava_comnds[command] == False:
ava_comnds[command] = True
print(F"{command} has been open")
elif ava_comnds[command] == True:
ava_comnds[command] = True
print(F"{command} has been already opened")
else:
print("impratical to happen")
elif orc == "close":
if ava_comnds[command] == False:
ava_comnds[command] = False
print(F"{command} has been already closed ")
elif ava_comnds[command] == True:
ava_comnds[command] = False
print(F"{command} has been close")
else:
print("impratical to happen")
else:
print("invalid input")
elif command == "end":
print(F"{r_name}, we hope your experience with tesla was imaculous")
break
else:
print("Please give a valid input")