Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Print Function
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  10 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
gengyang...@gmail.com  
View profile  
 More options Sep 21 2012, 4:20 pm
Newsgroups: comp.lang.python
From: gengyang...@gmail.com
Date: Fri, 21 Sep 2012 13:20:09 -0700 (PDT)
Local: Fri, Sep 21 2012 4:20 pm
Subject: Print Function
Hello ,

I am currently using Python 3.2.3 . WHen I use the print function by typing print "Game Over" , it mentions  " SyntaxError : invalid syntax ".  Any ideas on what the problem is and how to resolve it  ? Thanks a lot .

GengYang


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rodrick Brown  
View profile  
 More options Sep 21 2012, 4:28 pm
Newsgroups: comp.lang.python
From: Rodrick Brown <rodrick.br...@gmail.com>
Date: Fri, 21 Sep 2012 16:28:19 -0400
Local: Fri, Sep 21 2012 4:28 pm
Subject: Re: Print Function
Go away troll!

Sent from my iPhone

On Sep 21, 2012, at 4:27 PM, "gengyang...@gmail.com"


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tarek Ziadé  
View profile  
 More options Sep 21 2012, 4:29 pm
Newsgroups: comp.lang.python
From: Tarek Ziadé <ta...@ziade.org>
Date: Fri, 21 Sep 2012 22:29:55 +0200
Local: Fri, Sep 21 2012 4:29 pm
Subject: Re: Print Function
On 9/21/12 10:20 PM, gengyang...@gmail.com wrote:

> Hello ,

> I am currently using Python 3.2.3 . WHen I use the print function by typing print "Game Over" , it mentions  " SyntaxError : invalid syntax ".  Any ideas on what the problem is and how to resolve it  ? Thanks a lot .

print was a statement in python 2.x, it is now a function so you need
parenthesis:

 >>> print("Game Over")
Game Over


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ian Kelly  
View profile  
 More options Sep 21 2012, 4:54 pm
Newsgroups: comp.lang.python
From: Ian Kelly <ian.g.ke...@gmail.com>
Date: Fri, 21 Sep 2012 14:54:14 -0600
Local: Fri, Sep 21 2012 4:54 pm
Subject: Re: Print Function

On Fri, Sep 21, 2012 at 2:28 PM, Rodrick Brown <rodrick.br...@gmail.com> wrote:
> Go away troll!

Troll? It looked like a sincere question to me.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alister  
View profile  
 More options Sep 21 2012, 5:11 pm
Newsgroups: comp.lang.python
From: Alister <alister.w...@ntlworld.com>
Date: Fri, 21 Sep 2012 21:11:29 GMT
Local: Fri, Sep 21 2012 5:11 pm
Subject: Re: Print Function

On Fri, 21 Sep 2012 14:54:14 -0600, Ian Kelly wrote:
> On Fri, Sep 21, 2012 at 2:28 PM, Rodrick Brown <rodrick.br...@gmail.com>
> wrote:
>> Go away troll!

> Troll? It looked like a sincere question to me.

but one that page 1 of the documentation would answer.

--
Waste not, get your budget cut next year.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John Gordon  
View profile  
 More options Sep 21 2012, 5:17 pm
Newsgroups: comp.lang.python
From: John Gordon <gor...@panix.com>
Date: Fri, 21 Sep 2012 21:17:45 +0000 (UTC)
Local: Fri, Sep 21 2012 5:17 pm
Subject: Re: Print Function

In <db8c7111-8fc7-4884-8c58-987399f7793f@googlegroups.com> gengyang...@gmail.com writes:
> I am currently using Python 3.2.3 . WHen I use the print function by
> typing print "Game Over" , it mentions  " SyntaxError : invalid syntax ".
> Any ideas on what the problem is and how to resolve it  ? Thanks a lot .

In python version 3, print was changed into a function.

Use this and it will work:

  print("Game Over")

--
John Gordon                   A is for Amy, who fell down the stairs
gor...@panix.com              B is for Basil, assaulted by bears
                                -- Edward Gorey, "The Gashlycrumb Tinies"


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ian Kelly  
View profile  
 More options Sep 21 2012, 6:43 pm
Newsgroups: comp.lang.python
From: Ian Kelly <ian.g.ke...@gmail.com>
Date: Fri, 21 Sep 2012 16:43:05 -0600
Local: Fri, Sep 21 2012 6:43 pm
Subject: Re: Print Function

On Fri, Sep 21, 2012 at 3:11 PM, Alister <alister.w...@ntlworld.com> wrote:
> On Fri, 21 Sep 2012 14:54:14 -0600, Ian Kelly wrote:

>> On Fri, Sep 21, 2012 at 2:28 PM, Rodrick Brown <rodrick.br...@gmail.com>
>> wrote:
>>> Go away troll!

>> Troll? It looked like a sincere question to me.

> but one that page 1 of the documentation would answer.

So point the asker to the documentation, don't just dismiss them as a troll.

This newsgroup has a reputation for being friendly.  Let's keep it that way.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Steven D'Aprano  
View profile  
 More options Sep 21 2012, 9:26 pm
Newsgroups: comp.lang.python
From: Steven D'Aprano <steve+comp.lang.pyt...@pearwood.info>
Date: 22 Sep 2012 01:26:43 GMT
Local: Fri, Sep 21 2012 9:26 pm
Subject: Re: Print Function

On Fri, 21 Sep 2012 13:20:09 -0700, gengyangcai wrote:
> I am currently using Python 3.2.3 . WHen I use the print function by
> typing print "Game Over" , it mentions  " SyntaxError : invalid syntax
> ".  Any ideas on what the problem is and how to resolve it  ?

No, none what so ever. Perhaps you are the first person in the world to
have come across this error. If you ever solve it, please write up the
solution and put it on a blog or a website somewhere so that if it ever
happens again, googling for "python print SyntaxError" will return a
useful result.

Tongue-firmly-in-cheek-ly y'rs,

--
Steven


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mark Lawrence  
View profile  
 More options Sep 22 2012, 3:27 am
Newsgroups: comp.lang.python
From: Mark Lawrence <breamore...@yahoo.co.uk>
Date: Sat, 22 Sep 2012 08:27:32 +0100
Local: Sat, Sep 22 2012 3:27 am
Subject: Re: Print Function
On 22/09/2012 02:26, Steven D'Aprano wrote:

> On Fri, 21 Sep 2012 13:20:09 -0700, gengyangcai wrote:

>> I am currently using Python 3.2.3 . WHen I use the print function by
>> typing print "Game Over" , it mentions  " SyntaxError : invalid syntax
>> ".  Any ideas on what the problem is and how to resolve it  ?

> No, none what so ever. Perhaps you are the first person in the world to
> have come across this error. If you ever solve it, please write up the
> solution and put it on a blog or a website somewhere so that if it ever
> happens again, googling for "python print SyntaxError" will return a
> useful result.

> Tongue-firmly-in-cheek-ly y'rs,

+ one trillion

--
Cheers.

Mark Lawrence.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Walter Hurry  
View profile  
 More options Sep 22 2012, 7:28 pm
Newsgroups: comp.lang.python
From: Walter Hurry <walterhu...@lavabit.com>
Date: Sat, 22 Sep 2012 23:28:10 +0000 (UTC)
Local: Sat, Sep 22 2012 7:28 pm
Subject: Re: Print Function

On Sat, 22 Sep 2012 01:26:43 +0000, Steven D'Aprano wrote:
> On Fri, 21 Sep 2012 13:20:09 -0700, gengyangcai wrote:

>> I am currently using Python 3.2.3 . WHen I use the print function by
>> typing print "Game Over" , it mentions  " SyntaxError : invalid syntax
>> ".  Any ideas on what the problem is and how to resolve it  ?

> No, none what so ever. Perhaps you are the first person in the world to
> have come across this error. If you ever solve it, please write up the
> solution and put it on a blog or a website somewhere so that if it ever
> happens again, googling for "python print SyntaxError" will return a
> useful result.

> Tongue-firmly-in-cheek-ly y'rs,

I think OP rather gave the game away with the subject line.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »