[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)+

Re: [Tutor] where I am going wrong?

2011-12-14 Thread Wayne Werner
On Wed, Dec 14, 2011 at 8:13 AM, surya k sur...@live.com 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):

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 sur...@live.commailto:sur...@live.com wrote:

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: 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, 14 Dec 2011

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

[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

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):

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...@gmail.com Date:

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

[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

[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 1

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 from Python

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

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.It

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

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

[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

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

2011-12-14 Thread rog capp
. N. Kitchener, ON, Canada N2G 4Y7 PH: +1 519-744-8005 x7313 www.christiedigital.comhttp://www.christiedigital.com -- next part -- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/tutor/attachments/20111214/7b01e759/attachment-0001.html

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

2011-12-14 Thread Prasad, Ramit
snip 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: