I want my pong game that is made by turtle module to start when user press Enter key (python)
what I did is just add s to start but I cannot do enter key he should type enter as string word not key
I want my pong game that is made by turtle module to start when user press Enter key (python)
what I did is just add s to start but I cannot do enter key he should type enter as string word not key
As @droebi mentioned, I would advise you to slightly improve the question, as there are some mistakes that add slight difficulty to read your question.
But from what I inferred, you want the user to not press the enter key, but actually type the word enter
in the console to start the program.
This problem can be solved in two ways:
input("Type Enter to start:\n")
# your code
You can do this if you don't really care what the user is typing.
import sys
start = input("Type Enter to start:\n").lower()
if start == "enter":
pass
else:
sys.exit("You did not type Enter. Please type 'Enter' to start.")
# your code
You can do this if you want to be particular that the user SHOULD type enter
.
In case you did want to start the program when the enter
key is pressed, however, then you can take a look at the answers for this question.