I believe that line 3 raises an error. The because you contained the text in single quotes, and then used the same character in 'you're not chris', Python believes that you are trying to type "you" re not chris". You can change the single quotes surrounding your string to double quotes ("you're not chris"), triple-single quotes ('''you're not chris'''), or triple-double quotes ("""you're not chris"""), or you can tell Python that you want to include the apostrophe in your string by preceding it with a \ ('you\'re not chris'). The latter works on the same idea as \n and \t.<br>
<br><div class="gmail_quote">On Wed, Jan 11, 2012 at 6:04 AM, col speed <span dir="ltr"><<a href="mailto:ajarncolin@gmail.com">ajarncolin@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">>>>><br>
>>>>> your_weight = int(raw_input("Please enter your weight: "))<br>
>>>>> if your_weight < 0:<br>
>>>>> print 'You're not Chris!'<br>
>>>>> elif your_weight == 170:<br>
>>>>> print 'You might be Chris! But...'<br>
>>>>> your_height = int(raw_input("Please enter your height: "))<br>
>>>>> if your_height < 180:<br>
>>>>> print 'You're not Chris!<br>
>>>>> elif your_height == 180:<br>
>>>>> print 'You're Chris!'<br>
>>>>> your_name = int(raw_input("What is your name? "))<br>
>>>>> elif your_height > 180:<br>
>>>>> print 'You're not Chris!"<br>
>>>>> elif x > 170:<br>
>>>>> print 'You're not Chris!'<br>
>>>><br>
>>>><br>
>>>> When I open it, the program says I have a syntax error. Praytell, where<br>
>>>> did<br>
</div>>>>> I go wrong?n<br>
I'm a newbie, but I get "NameError" because 'x' is not defined.<br>
Also "your_name = int(raw_input("What is your name? "))" will give this :<br>
ValueError: invalid literal for int() with base 10: 'name'.<br>
As you can't change a string to be an int.<br>
I can't find a syntax error, but next time, please paste the whole<br>
traceback as this helps people with less time than me to sort out<br>
problems.<br>
<br>
Good luck with Python<br>
<font color="#888888">Col<br>
</font><div><div></div><div class="h5">_______________________________________________<br>
Tutor maillist - <a href="mailto:Tutor@python.org">Tutor@python.org</a><br>
To unsubscribe or change subscription options:<br>
<a href="http://mail.python.org/mailman/listinfo/tutor" target="_blank">http://mail.python.org/mailman/listinfo/tutor</a><br>
</div></div></blockquote></div><br>