-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..?

  • 1
    Possible duplicate of [Python: user input and commandline arguments](https://stackoverflow.com/questions/70797/python-user-input-and-commandline-arguments) – Shai Jul 12 '17 at 10:53

3 Answers3

0

I think you are looking for input command

Shai
  • 102,241
  • 35
  • 217
  • 344
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
  • 6,759
  • 5
  • 27
  • 41
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