Re: [Tutor] Tutor Digest, Vol 94, Issue 53

2011-12-14 Thread Prasad, Ramit
> > End of Tutor Digest, Vol 94, Issue 53 > * while guess != the_number and tries < 5: if guess > the_number: print("Lower...") else: print("Higher...") guess = int(input("Take a guess: ")) tries += 1 if guess == the_number:

Re: [Tutor] Tutor Digest, Vol 94, Issue 53

2011-12-14 Thread rog capp
      pointer to a variable   >                 By reference > where the tristimulus X > will be stored > > fY                     FLOAT *                        pointer to a variable   >                 By reference > where the tristimulus Y > will be stored > &g

[Tutor] Installing Python and modules

2011-12-14 Thread Sean Baumgarten
Hello, I'm wondering if someone could walk me step-by-step through installing Python and some third-party modules. I've never used Python or other programming languages before, but I'm just trying to install it so I can run a simple script. I'm running Mac OSX 10.6.8. Here's the instructions in t

Re: [Tutor] while loops

2011-12-14 Thread Prasad, Ramit
-Original Message- From: tutor-bounces+ramit.prasad=jpmorgan@python.org [mailto:tutor-bounces+ramit.prasad=jpmorgan@python.org] On Behalf Of rog capp Sent: Wednesday, December 14, 2011 4:41 PM To: tutor@python.org Subject: [Tutor] while loops # Guess my number # # The computer pi

Re: [Tutor] ctype exceptions.ValueError for function call

2011-12-14 Thread Alan Gauld
On 14/12/11 21:15, Santhirakumaran, Gokul wrote: Hi, I’m trying to use a SDK(dll file) with python ctypes to take measurement from a spectrometer. This list is for people learning the Python language. ctypes is a little advanced for most readers. You are more likely to get help on the ctypes m

Re: [Tutor] while loops

2011-12-14 Thread Alan Gauld
On 14/12/11 22:41, rog capp wrote: # Guessing loop while guess != the_number: if guess> the_number: else: guess = int(input("Take a guess: ")) tries += 1 If he/she fails to guess the number after a certain number of attempts then it displays a message about his failure.I

Re: [Tutor] while loops

2011-12-14 Thread Dave Angel
On 12/14/2011 05:41 PM, rog capp wrote: # Guess my number # # The computer picks a random number between 1 and 100 # The player tries to guess it and the computer lets # the player know if the guess is to high, to low # or right on the money import random print("\tWelcome to 'Guess My Number'!

Re: [Tutor] while loops

2011-12-14 Thread Steven D'Aprano
rog capp wrote: [...] # Guessing loop while guess != the_number: if guess > the_number: print("Lowere...") else: print("Higher...") guess = int(input("Take a guess: ")) tries += 1 print("good job") input("\n\nPress the enter key to exit.") This is a program fr

[Tutor] while loops

2011-12-14 Thread rog capp
# Guess my number # # The computer picks a random number between 1 and 100 # The player tries to guess it and the computer lets # the player know if the guess is to high, to low # or right on the money import random print("\tWelcome to 'Guess My Number'!") print("I'm thinking of a number between

[Tutor] ctype exceptions.ValueError for function call

2011-12-14 Thread Santhirakumaran, Gokul
Hi, I'm trying to use a SDK(dll file) with python ctypes to take measurement from a spectrometer. I some how got the deceive connected and took the measurement , but when I try to call one of its calculation function I'm getting the "exceptions.ValueError: Procedure probably called with not en

Re: [Tutor] Tuple: Am I Understanding This Correctly?

2011-12-14 Thread Alan Gauld
On 14/12/11 15:48, Homme, James wrote: Am I explaining how this works correctly? You are not really explaining *how* it works, just saying what it does. What you are doing is sensible iff you have many places where the tuple is useful. In the specific case I'd personally just create the tuple

Re: [Tutor] where I am going wrong?

2011-12-14 Thread surya k
> Date: Wed, 14 Dec 2011 10:39:53 -0500 > From: d...@davea.name > To: sur...@live.com > CC: waynejwer...@gmail.com; tutor@python.org > Subject: Re: [Tutor] where I am going wrong? > > On 12/14/2011 09:29 AM, surya k wrote: > > > > > > > >> From: waynejwer...@gma

Re: [Tutor] where I am going wrong?

2011-12-14 Thread Robert Sjoblom
surya k wrote: > This is a project Euler puzzle. http://projecteuler.net/problem=30 > I applied brute force way and here is my codek=0for p in range(1,10): > for q in range(0,10): for r in range(0,10): >for s in range(0,10):

[Tutor] Tuple: Am I Understanding This Correctly?

2011-12-14 Thread Homme, James
Hi, My learning style likes a lot of words in plain English. Here is some code. Am I explaining how this works correctly? # Make a tuple to simplify putting in the prompts below. # This makes it so that you don't have to type out the whole thing every time you want to use these strings. # The va

Re: [Tutor] where I am going wrong?

2011-12-14 Thread Dave Angel
On 12/14/2011 09:29 AM, surya k wrote: From: waynejwer...@gmail.com Date: Wed, 14 Dec 2011 08:25:53 -0600 Subject: Re: [Tutor] where I am going wrong? To: sur...@live.com CC: tutor@python.org On Wed, Dec 14, 2011 at 8:13 AM, surya k mailto:sur...@live.com>> w

Re: [Tutor] where I am going wrong?

2011-12-14 Thread surya k
> From: sur...@live.com > To: waynejwer...@gmail.com > CC: tutor@python.org > Subject: RE: [Tutor] where I am going wrong? > Date: Wed, 14 Dec 2011 19:59:24 +0530 > > > > > > > From: waynejwer...@gmail.com > > Date: Wed, 1

Re: [Tutor] where I am going wrong?

2011-12-14 Thread Peter Otten
surya k wrote: > This is a project Euler puzzle. http://projecteuler.net/problem=30 > I applied brute force way and here is my codek=0for p in range(1,10): > for q in range(0,10): for r in range(0,10): > for s in range(0,10):

Re: [Tutor] where I am going wrong?

2011-12-14 Thread surya k
> From: waynejwer...@gmail.com > Date: Wed, 14 Dec 2011 08:25:53 -0600 > Subject: Re: [Tutor] where I am going wrong? > To: sur...@live.com > CC: tutor@python.org > > On Wed, Dec 14, 2011 at 8:13 AM, surya k > mailto:sur...@live.com>> wrote: > > This

Re: [Tutor] where I am going wrong?

2011-12-14 Thread Wayne Werner
On Wed, Dec 14, 2011 at 8:13 AM, surya k wrote: > > This is a project Euler puzzle. http://projecteuler.net/problem=30 > I applied brute force way and here is my code > k=0for p in range(1,10):for q in range(0,10):for r in > range(0,10):for s in range(0,10):

[Tutor] where I am going wrong?

2011-12-14 Thread surya k
This is a project Euler puzzle. http://projecteuler.net/problem=30 I applied brute force way and here is my code k=0for p in range(1,10):    for q in range(0,10):        for r in range(0,10):            for s in range(0,10):                for t in range(0,10):                 n = (p*1)+ (q*