-2

For example, if the program asks the user to press enter on their keyboard to continue, the program can recognise it & continue. I'm still a student so not really sure, is it possible..?

3 Answers3

0

I think you are looking for input command

Shai
  • 111,146
  • 38
  • 238
  • 371
0

You need to use the input statement and assign the input to variables like this:

name = input("What's your name? ")
print("Hello there, " + name + "!")

It's that simple!

TomServo
  • 7,248
  • 5
  • 30
  • 47
0

Use the input function as well as if statements:

x = input("What's 1+1?")
if x == 2:
    print("correct")
else:
    print("Wrong")
BloodViolet
  • 67
  • 2
  • 10