Microsoft
Software
Hardware
Network
Question : Error trying to print "Hello World" in Python 3.0!
This must be the mother of all newbie questions, but I'm literally JUST starting to learn Python, and happen to be using Python 3.0 on Windows Vista, downloaded from:
http://www.python.org/ftp/
python/3.0
/python-3.
0.msi
I'm not completely new to programming concepts, and have done scripting using CSS & XHTML & Excel VBA before.
I am basically here asking because I need some encouragement to keep learning, rather than just get depressed & frustrated & give up before I even start for real!
Without further ado, when at the >>> prompt I type:
print "Hello World!"
I get the following error:
SyntaxError: invalid syntax (
, line 1)
What am I doing wrong? Is this "Python Shell" something totally different from the needed Python "interpreter" for example? Please save me before I give up and close this programming & Python book!
Code Snippet:
1:
print "Hello World!"
Open in New Window
Select All
Answer : Error trying to print "Hello World" in Python 3.0!
This is one of the new things in Python3, print is now a function, call it like this:
print("Hello World!")
http://docs.python.org/3.0
/whatsnew/
3.0.html
Random Solutions
IF..THEN..ELIF conditions
Use function as filter for SQL view
i have windows xp pro x64 3712 MB RAM limit
Nested IF THEN statements and formulas? How can I make a long formula or is there a better way.
AIX cpu alarm monitor script.
Exchange 2007 Anti-Spam Agents not working well after SP1 applied
Windows XP SP2 locks up frequently and event log erros are Sidebyside Event ID 32 and 59
Outlook 2003 how to view html files "inline"...not as an attachment
Windows 2003 domain logon scrip for Vista client
Report viewer RDLC report grouping