Does the code not prompt the user for input?

I am starting to program in Python. Using Python3 for a 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 on the "userinput = input ()" part of my code. For some reason, my program didn't prompt the user for input. How can I fix this?

Thank!

+3


source to share


1 answer


Are you really calling the function? That is, you say loop()

at the end of your code?



+3


source







All Articles