This is the place for queries that don't fit in any of the other categories.
THE ERROR WAS A COUPLE LINES ABOVE;FIXED
I am rewriting an old script to get away from C, and I get a syntax error on the second line. Code:
- Code: Select all
twopq = raw_input("Do you have two ordered pairs?\n> ")
if twopq.lower() in ['n', 'no']:
print "Why are you using slope-intercept form? Get out."
elif twopq.lower() in ['y', 'yes']:
I can't find anything wrong with that.
Last edited by Mekire
on Tue Dec 24, 2013 3:53 pm, edited 1 time in total.
Laptop w/ Ubuntu 14.04
- Posts: 100
- Joined: Sat Nov 23, 2013 6:13 pm
Always post your full traceback/error message.
If the topic of the thread represents part of the traceback, 'if in ' is not valid python.
- Posts: 87
- Joined: Thu Feb 21, 2013 8:46 pm
You should post the problem and how you fixed it, to help future users.
- Posts: 1476
- Joined: Thu Feb 07, 2013 4:47 pm
- Location: Elmira, NY
Return to General Coding Help
Who is online
Users browsing this forum: Baldyr, Bing [Bot], conor100, Google [Bot], Larz60+, W3C [Linkcheck] and 3 guests