[Tutor] python beginner-doubt
subha krishna
subhakrishh at gmail.com
Mon May 6 07:26:24 CEST 2013
hi,
i need an help in the following program
i just started to learn.
if speed >= 80:
print 'License and registration please'
if mood == 'terrible' or speed >= 100:
print 'You have the right to remain silent.'
elif mood == 'bad' or speed >= 90:
print "I'm going to have to write you a ticket."
write_ticket()
else:
print "Let's try to keep it under 80 ok?"
in this prgm how to give the value of speed and mood.
i have written like this to get the value
def main():
print 'enter the speed and mood'
print 'enter the speed',speed
if speed >= 80:
print 'License and registration please'
print 'enter the mood',mood
if mood== 'terrible' or speed >=100
print 'you hve the right to remain silent.'
elif mood =='bad' or speed >=90:
print "I 'm going to have to write you a ticket."
write_ticket()
else:
print "Let's try to keep it under 80 ok?"
i am getting error in this line (if mood== 'terrible' or speed >=100)
kindly give me an idea about the mistake and how to get the values...
thanks and regards
subha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20130506/54e97233/attachment.html>
More information about the Tutor
mailing list