Skip to content

Commit 4630620

Browse files
authored
Update main.py
edit #2 today: added error prompt when giving invalid input for game selector
1 parent b141cac commit 4630620

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

main.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import psutil
77
import requests
88
import wolframalpha
9-
import os
109
import os.path
1110
import hashlib
1211

@@ -191,6 +190,8 @@ def batterypercent():
191190
os.chdir("..")
192191
elif gamechoice == "exit":
193192
print("Okay, returning to main menu...")
193+
else:
194+
print("Invalid game choice! Returning to main menu...")
194195
elif whattodo == 6:
195196
for i in range(1):
196197
print("Type 'exit' to exit")
@@ -205,3 +206,4 @@ def batterypercent():
205206
break
206207
else:
207208
print("\nInvalid program/script!\n")
209+

0 commit comments

Comments
 (0)