I have a question for Python users!! It is posted below?

So far what I have is this:

to_seat == int(input('enter seat number:')if to_seat % 2 == 0    print (to_seat, "is on the right")else:        print (to_seat, "is on the left")   to_go = input ( "Enter 'Y' to continue or 'n'to quit.")     but I cant figure out to make it work with the while loop. Suggestions are greatly appreciated! 

Attachment image

1 Answer

Relevance
  • Tasm
    Lv 6
    1 month ago

     to_go = input ( "Enter 'Y' to continue or 'n'to quit.") 

    Change it to

    to_seat = input ( "Enter 'Y' to continue or 'n'to quit.") 

    Then change your loop to

    while to_seat == 'Y' or to_seat== 'y':

    • chanel1 month agoReport

      Hi! thank you for your help! I am getting an error that says  "NameError: name 'to_seat' is not defined" 

      How would I define this?

    • Login to reply the answers
Still have questions? Get your answers by asking now.