Apr-02-2019, 08:26 PM
This one working before. I am trying to figure out how to make it on a enter of a int a msg is played.
CODE:
Sorry if this is a easy fix but I am new to python :)
CODE:
import time #Imports the time function #Welcome Message print('*-*-*-*-*-*-**-*-*-*-*-*-**-*-*-*-*-*-**-*-*-*-*-*-* \n - (Welcome to the Hotel Selection Menu) - \n*-*-*-*-*-*-**-*-*-*-*-*-**-*-*-*-*-*-**-*-*-*-*-*-* \n\nEnter one of the numbers below:\n\n> 1 add a guest entry\n> 2 view guest information\n> 3 remove guest entry\n> 4 generate new key code\n> 5 exit this program\n\n*-*-*-*-*-*-**-*-*-*-*-*-**-*-*-*-*-*-**-*-*-*-*-*-*') #Making the functions work while True: char = input() if (char == "1"): print("Guest Entry Add") time.sleep(1) if (char == "2"): print("View Guest Info") time.sleep(1) if (char == "3"): print("Remove Guest Entry") time.sleep(1) if (char == "4"): print("Generate new code") time.sleep(1) if (char == "5"): print("Exiting the program...") time.sleep(1) time.sleep(3) exit(0)This was working at school however, I am now getting the error:
Error:Traceback (most recent call last):
File "C:/Users/<MY NAME>/Desktop/work.py", line 10, in <module>
char = input()
File "<string>", line 0
^
SyntaxError: unexpected EOF while parsing
Any suggestions how to fix?Sorry if this is a easy fix but I am new to python :)