Someone
Someone

Reputation: 35

Code Won't Ask User for Input?

I am a beginner in Python programming. Using Python3 for class.

The code I have is:

#!/usr/binpython3
import arduino
def loop():
      contin = True
      while contin:
             userinput = input()
             if userinput == "quit":
                      contin = False
             else:
                      contin = True

I am stuck at the "userinput = input()" portion of my code. For some reason, my program would not ask user for the input. How can I fix this?

Thank you!

Upvotes: 3

Views: 408

Answers (1)

splinter
splinter

Reputation: 3907

Are you actually calling the function? That is, are you saying loop() at the end of your code?

Upvotes: 3

Related Questions