Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #39406

Re: i need help

References <5125E44C.90004@libero.it>
Date 2013-02-21 20:13 +1100
Subject Re: i need help
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.2148.1361438018.2939.python-list@python.org> (permalink)

Show all headers | View raw


On Thu, Feb 21, 2013 at 8:09 PM, leonardo <tampucciolina@libero.it> wrote:
> hi guys,
>
> i just created this file:
>
> print "i love pizza!"
> print "pizza" * 20
> print "yum" * 40
> print "i'm full."
>
> and saved it into a file with "idle-gui", if i try to run the program i get
> an invalid syntax error, it displays a red sign on the  quote mark at the
> end of the first row of my program..
> i checked but i didn't make mistaked..is idle a bit crazy??

Are you using Python version 3? If so, you need to put parentheses
around your print arguments, because print is a function:

print("i love pizza!")
print("pizza" * 20)
print("yum" * 40)
print("i'm full.")

As an additional tip, I believe your keyboard has a couple of keys on
it marked "Shift". Holding one down lets you produce capital letters,
which make your emails significantly more readable. Get some practice
with these keys, as you'll use them a lot in programming :)

ChrisA

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: i need help Chris Angelico <rosuav@gmail.com> - 2013-02-21 20:13 +1100

csiph-web