-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
33 lines (26 loc) · 888 Bytes
/
main.py
File metadata and controls
33 lines (26 loc) · 888 Bytes
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
from game import load_progress, reset_progress, run_python_round, run_sql_round, show_dashboard
def main() -> None:
progress = load_progress()
while True:
show_dashboard(progress)
print("Choose an option:")
print("1) Play Python challenge")
print("2) Play SQL challenge")
print("3) Reset progress")
print("4) Exit")
choice = input("\nEnter choice (1-4): ").strip()
print()
if choice == "1":
run_python_round(progress)
elif choice == "2":
run_sql_round(progress)
elif choice == "3":
reset_progress()
progress = load_progress()
elif choice == "4":
print("Thanks for playing. Keep coding.")
break
else:
print("Invalid choice. Pick 1, 2, 3, or 4.\n")
if __name__ == "__main__":
main()