TitanMATRIX
In Runtime
- Messages
- 202
Hi!,
I've been teaching myself python but I've ran into problems. As I'm reading tutorials online I find that my interperator isn't doing what it SHOULD be doing as I'm typing in EXACTLY how it is in the tutorials. Is this a problem with any libraries? Everytime I try to something it comes up with a "syntax error" so I'm breaking the rules somewhere (I'm just thinking that the stuff I'm trying to do isn't defined in the libraries so thats how I get the syntax). The stuff I was trying to do was simple like so:
>>> a = 'do not press that button'
>>> a
>>> 'do not press that button' #ok so it works when I enter a.
>>> if a:
... print 'BOOM!'
(now I get the syntax error)
what am I doing wrong here? I can do simple stuff like mathematics equations and defining variables in a mathematical equation or make a list or make a sentence... however this stuff doesn't want to work.
Thanks,
Nick
I've been teaching myself python but I've ran into problems. As I'm reading tutorials online I find that my interperator isn't doing what it SHOULD be doing as I'm typing in EXACTLY how it is in the tutorials. Is this a problem with any libraries? Everytime I try to something it comes up with a "syntax error" so I'm breaking the rules somewhere (I'm just thinking that the stuff I'm trying to do isn't defined in the libraries so thats how I get the syntax). The stuff I was trying to do was simple like so:
>>> a = 'do not press that button'
>>> a
>>> 'do not press that button' #ok so it works when I enter a.
>>> if a:
... print 'BOOM!'
(now I get the syntax error)
what am I doing wrong here? I can do simple stuff like mathematics equations and defining variables in a mathematical equation or make a list or make a sentence... however this stuff doesn't want to work.
Thanks,
Nick