Thursday, 5 September 2013

Print syntax error

Print syntax error

I am new to coding and have a simple problem that I could not figure out.I
am using python 2.7.5.
>>> z='b'
>>> if 'x'<z:
print 'Hello'
print 'Mom'
SyntaxError: invalid syntax
(Print is highlighted)
Am I not supposed to get the result Mom? I saw this in the MIT lecture on
youtube and tried to do the same as the instructor did but I get this
error.Can anyone help me? Thanks for your time.

No comments:

Post a Comment