-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
125 lines (93 loc) · 4.04 KB
/
main.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
from time import sleep
def main():
print("Codefest 2021 Bootcamp: Example Python Programs")
print("-------------------------------------------------\n")
delay = 1.3
while True:
print("Select your level:\n")
print("1. Beginner")
print("2. Intermediate\n")
print("Enter Q to quit\n")
level = input("")
sleep(delay)
if(level == "1"):
print("\n-------------------------------------------------\n")
while True:
print("Type in the first letter of the program you want to run:\n")
print(" - a_input_script.py")
print(" - b_for_script.py")
print(" - c_if_script.py")
print(" - d_while_script.py")
print(" - e_functions_script.py")
print(" - f_returning_values_script.py\n")
print("Enter B to go back\n")
level = input("")
sleep(delay)
if(level == "a"):
print("\n-------------------------------------------------")
exec(open("Beginner/a_input_script.py").read())
print("\n-------------------------------------------------\n")
elif(level == "b"):
print("\n-------------------------------------------------")
exec(open("Beginner/b_for_script.py").read())
print("\n-------------------------------------------------\n")
elif(level == "c"):
print("\n-------------------------------------------------")
exec(open("Beginner/c_if_script.py").read())
print("\n-------------------------------------------------\n")
elif(level == "d"):
print("\n-------------------------------------------------")
exec(open("Beginner/d_while_script.py").read())
print("\n-------------------------------------------------\n")
elif(level == "e"):
print("\n-------------------------------------------------")
exec(open("Beginner/e_functions_script.py").read())
print("\n-------------------------------------------------\n")
elif(level == "f"):
print("\n-------------------------------------------------")
exec(open("Beginner/f_returning_values_script.py").read())
print("\n-------------------------------------------------\n")
elif(level == "B"):
break
else:
print("\n-------------------------------------------------")
print("\nType in a letter or B")
print("\n-------------------------------------------------\n")
sleep(delay)
print("\n-------------------------------------------------\n")
elif(level == "2"):
print("\n-------------------------------------------------\n")
while True:
print("Type in the first letter of the program you want to run:\n")
print(" - a_input_script.py")
print(" - b_for_script.py\n")
print("Enter B to go back\n")
level = input("")
sleep(delay)
if(level == "a"):
print("\n-------------------------------------------------")
exec(open("Intermediate/a_input_script.py").read())
print("\n-------------------------------------------------\n")
elif(level == "b"):
print("\n-------------------------------------------------")
exec(open("Intermediate/b_for_script.py").read())
print("\n-------------------------------------------------\n")
elif(level == "B"):
break
else:
print("\n-------------------------------------------------")
print("\nType in a letter or B")
print("\n-------------------------------------------------\n")
sleep(delay)
print("\n-------------------------------------------------\n")
elif(level == "Q"):
print("\n-------------------------------------------------")
print("\nGoodbye!")
break
else:
print("\n-------------------------------------------------")
print("\nType in 1, 2, or Q")
print("\n-------------------------------------------------\n")
sleep(delay)
if(__name__ == "__main__"):
main()