Help!


#1



https://www.codecademy.com/courses/python-beginner-en-cxMGf/0/4?curriculum_id=4f89dab3d788890003000096#
4 simple error.
choice = raw_input('Enjoying the course? (y/n)')

while !(choice == y or choice == n):
# Fill in the condition (before the colon)
choice = raw_input("Sorry, I didn't catch that. Enter again:")

it shows that there is a sytax error.
Although logically it is qrong and it wouldn't achieve the desired output but i don't know why they are showing syntax error


while !(choice == y or choice == n):
    # Fill in the condition (before the colon)
    choice = raw_input("Sorry, I didn't catch that. Enter again:")


#2

python doesn't know !, use the not keyword.

Also, in your condition, y and n are strings (not variable) so use quotation marks


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.