Member Avatar for silverflashh

Okay so here is the deal. I'm very brand new to anything when it comes to programming. I decided to try python out. I'm attempting to do the very first project but I keep getting a syntax error. Here is my code:

1. print "Hello Monty Python!"

I get the "Invalid Syntax Error", then it highlights the word print.
I imagine that means there is something wrong with that command, but I'm not quite sure what.

Ah, are you using Python3.0 or 2.6?
In 2.6, the above would be acceptable, but 3.0 does some major overhauls on the grammar, including changing the above, so it would need to be

print( "Hello Monty Python!" )

I would suggest downloading Python 2.6 and using that to learn instead, as 3.0 is quite new, still in its beta form, and the majority of anything you find through Google or elsewhere will be directed at Python 2.6 or below.

Member Avatar for silverflashh

thank you, i tried it and it worked :D
that is hurdle #1

Yep, as I was saying, Python 3.0 can be quite different from 2.6 and below, so I would use 2.6 for now (I do too). There are WAY more modules still not compatible with 3.0, and it isn't a full release yet either. It's much easier to stick with Python 2.6 to try learning it from the ground up.

Ah, are you using Python3.0 or 2.6?
In 2.6, the above would be acceptable, but 3.0 does some major overhauls on the grammar, including changing the above, so it would need to be

print( "Hello Monty Python!" )

I would suggest downloading Python 2.6 and using that to learn instead, as 3.0 is quite new, still in its beta form, and the majority of anything you find through Google or elsewhere will be directed at Python 2.6 or below.

Wasn't 3.0 final released a few months ago? But I still agree with using 2.6 or 2.5 for someone learning.

Wasn't 3.0 final released a few months ago? But I still agree with using 2.6 or 2.5 for someone learning.

Oh, I might be wrong. I haven't check the Python.org site in a long time, but I wasn't sure if they actually released more than the beta yet. I stand corrected :P

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.