Danci Emanuel | 1 Jan 2011 02:05
Picon
Favicon

Re: Tutor Digest, Vol 82, Issue 122

Thank you all for you prompt response! I solved the problem by installing Audiere.
Happy New Year and I wish you blessings and successes to you and your loved ones.

Regards,
Emanuel DANCI

--- On Fri, 12/31/10, tutor-request <at> python.org <tutor-request <at> python.org> wrote:

From: tutor-request <at> python.org <tutor-request <at> python.org>
Subject: Tutor Digest, Vol 82, Issue 122
To: tutor <at> python.org
Date: Friday, December 31, 2010, 3:00 AM

Send Tutor mailing list submissions to
    tutor <at> python.org

To subscribe or unsubscribe via the World Wide Web, visit
    http://mail.python.org/mailman/listinfo/tutor
or, via email, send a message with subject or body 'help' to
    tutor-request <at> python.org

You can reach the person managing the list at
    tutor-owner <at> python.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Tutor digest..."
Today's Topics:

   1. Problem installing pyaudiere (Danci Emanuel)
   2. Re: Problem installing pyaudiere (Peter Otten)
   3. Re: Problem installing pyaudiere (Serdar Dalgic)
   4. Re: Python 2.7.1 interpreter (Frank Chang)
_______________________________________________
Tutor maillist  -  Tutor <at> python.org
http://mail.python.org/mailman/listinfo/tutor

_______________________________________________
Tutor maillist  -  Tutor <at> python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
pete | 1 Jan 2011 18:02

syntax error that i cant spot!

Hi,
Please help just starting out and have come up with the following code 
to create a simple guessing game.

on line 30 print good job etc i get a syntax error! sure it's simple but 
i've looked for ages and cant spot it!

Regards
Pete
Attachment (guessing game.py): text/x-python, 832 bytes
_______________________________________________
Tutor maillist  -  Tutor <at> python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
Abhijeet Rastogi | 1 Jan 2011 18:11
Picon
Gravatar

Re: syntax error that i cant spot!

You missed a "+" after myName on line 30.

On Sat, Jan 1, 2011 at 10:32 PM, pete <psmouty <at> live.com> wrote:
Hi,
Please help just starting out and have come up with the following code to create a simple guessing game.

on line 30 print good job etc i get a syntax error! sure it's simple but i've looked for ages and cant spot it!

Regards
Pete

_______________________________________________
Tutor maillist  -  Tutor <at> python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor




--
Abhijeet Rastogi (shadyabhi)
http://www.google.com/profiles/abhijeet.1989
_______________________________________________
Tutor maillist  -  Tutor <at> python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
David Hutto | 1 Jan 2011 18:12
Picon

Re: syntax error that i cant spot!

On Sat, Jan 1, 2011 at 12:02 PM, pete <psmouty <at> live.com> wrote:
> Hi,
> Please help just starting out and have come up with the following code to
> create a simple guessing game.
>
> on line 30 print good job etc i get a syntax error! sure it's simple but
> i've looked for ages and cant spot it!
>
> Regards
> Pete

 print 'Good job, ' + myName + "! You guessed the number in " +
guessesTaken + ' guesses!'

you forgot to place a plus in between myName and "! You guessed the number in ".
>
> _______________________________________________
> Tutor maillist  -  Tutor <at> python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>
>
_______________________________________________
Tutor maillist  -  Tutor <at> python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Knacktus | 1 Jan 2011 18:14

Re: syntax error that i cant spot!

Am 01.01.2011 18:02, schrieb pete:
> Hi,
> Please help just starting out and have come up with the following code
> to create a simple guessing game.
>
> on line 30 print good job etc i get a syntax error! sure it's simple but
> i've looked for ages and cant spot it!
There's a + missing after myName

Also, I would use the same type of quotation marks. Not mixing '' and "".

>
> Regards
> Pete
>
>
>
> _______________________________________________
> Tutor maillist  -  Tutor <at> python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor

_______________________________________________
Tutor maillist  -  Tutor <at> python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

David Hutto | 1 Jan 2011 18:28
Picon

Re: syntax error that i cant spot!

You also can place:

else:
    print " this is not a number"

And:

    if guess == number:
        break

if guess == number:
    guessesTaken = str(guessesTaken)
    print 'Good job, ' + myName + "! You guessed the number in " +
guessesTaken + ' guesses!'

which could be combined.

 if guess == number:
        guessesTaken = str(guessesTaken)
        print 'Good job, ' + myName + "! You guessed the number in " +
guessesTaken + ' guesses!'
_______________________________________________
Tutor maillist  -  Tutor <at> python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Ken Green | 1 Jan 2011 20:28
Picon

Re: syntax error that i cant spot!

I am caught off guard but what is the purpose of the plus sign?  I don't 
recall seeing it used like that.

Ken

On 01/01/2011 12:11 PM, Abhijeet Rastogi wrote:
> You missed a "+" after myName on line 30.
>
> On Sat, Jan 1, 2011 at 10:32 PM, pete <psmouty <at> live.com 
> <mailto:psmouty <at> live.com>> wrote:
>
>     Hi,
>     Please help just starting out and have come up with the following
>     code to create a simple guessing game.
>
>     on line 30 print good job etc i get a syntax error! sure it's
>     simple but i've looked for ages and cant spot it!
>
>     Regards
>     Pete
>
>     _
>
>
_______________________________________________
Tutor maillist  -  Tutor <at> python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Corey Richardson | 1 Jan 2011 20:34
Gravatar

Re: syntax error that i cant spot!

On 01/01/2011 02:28 PM, Ken Green wrote:
> I am caught off guard but what is the purpose of the plus sign? I don't
> recall seeing it used like that.
>
> Ken
>
> On 01/01/2011 12:11 PM, Abhijeet Rastogi wrote:
>> You missed a "+" after myName on line 30.
>>
>> On Sat, Jan 1, 2011 at 10:32 PM, pete <psmouty <at> live.com
>> <mailto:psmouty <at> live.com>> wrote:
>>
>> Hi,
>> Please help just starting out and have come up with the following
>> code to create a simple guessing game.
>>
>> on line 30 print good job etc i get a syntax error! sure it's
>> simple but i've looked for ages and cant spot it!
>>
>> Regards
>> Pete
>>
>> _
>>
>>
> _______________________________________________
> Tutor maillist - Tutor <at> python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor

The + operator in this case concatenates, or joins, two strings.
"Hello, " + "World" == "Hello, World"
_______________________________________________
Tutor maillist  -  Tutor <at> python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

bob gailer | 1 Jan 2011 20:46
Picon

Re: syntax error that i cant spot!

On 1/1/2011 2:28 PM, Ken Green wrote:
> I am caught off guard but what is the purpose of the plus sign?  I 
> don't recall seeing it used like that.

I just tried to look that up in the Python Manuals. No success! Where is 
it hiding?

 >>> a = 'a'
 >>> b = 'b'
 >>> c = a + b
 >>> print c
ab

Now you can recall seeing it.

--

-- 
Bob Gailer
919-636-4239
Chapel Hill NC

_______________________________________________
Tutor maillist  -  Tutor <at> python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

bob gailer | 1 Jan 2011 20:50
Picon

Re: syntax error that i cant spot!

On 1/1/2011 2:28 PM, Ken Green wrote:
> I am caught off guard but what is the purpose of the plus sign?  I
> don't recall seeing it used like that.

I just tried to look that up in the Python Manuals. No success! Where is 
it hiding?

*** OOPS just found it in section 6.6 Sequence Types
s + t the concatenation of s and t

>>> a = 'a'
>>> b = 'b'
>>> c = a + b
>>> print c
ab

Now you can recall seeing it.

--

-- 
Bob Gailer
919-636-4239
Chapel Hill NC

_______________________________________________
Tutor maillist  -  Tutor <at> python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Gmane