Re: Help with "Guess the number" script

2014-03-02 Thread Dave Angel
Scott W Dunning Wrote in message: > Here are the directions I’m stuck on and what I have so far, I’ll bold the part That assumes that people can see which parts of your message are bold. Rather a poor assumption in a text list like these two python forums. You should be posting in text,

Re: Help with "Guess the number" script

2014-03-02 Thread Scott W Dunning
On Mar 2, 2014, at 8:52 PM, Ben Finney wrote: > > Once again, Scott, this discussion should be happening at the Tutor > forum. Please don't continue the fragmentation of this discussion; keep > the discusson over at the Tutor forum. Sorry, I was just replying to replies to my post. I get the po

Re: Help with "Guess the number" script

2014-03-02 Thread Ben Finney
Scott W Dunning writes: > This is what Im having trouble with now. Once again, Scott, this discussion should be happening at the Tutor forum. Please don't continue the fragmentation of this discussion; keep the discusson over at the Tutor forum. -- \ “I like to fill my bathtub up with wa

Re: Help with "Guess the number" script

2014-03-02 Thread Scott W Dunning
On Mar 2, 2014, at 6:40 PM, Scott W Dunning wrote: This is what Im having trouble with now. Here are the directions I’m stuck on and what I have so far, I’ll bold the part that’s dealing with the instructions if anyone could help me figure out where I’m going wrong. Thanks! from random im

Re: Help with "Guess the number" script

2014-03-02 Thread Scott W Dunning
On Mar 1, 2014, at 6:16 PM, Chris Angelico wrote: > > Another consideration: Susan's code is written for Python 3, but you > seemed to be using Python 2. You'll find that the code won't even run > on your version of Python. > > (If you have the chance, ask if the course writer would consider >

Re: Help with "Guess the number" script

2014-03-02 Thread Scott W Dunning
On Mar 2, 2014, at 12:38 AM, Larry Hudson wrote: > > Another 'problem' is what you failed to mention in your post, but is apparent > from the instructions that you posted -- this assignment is NOT the complete > program, just the beginning of one. Your instructor obviously wants you to > wor

Re: Help with "Guess the number" script

2014-03-01 Thread Larry Hudson
On 03/01/2014 05:11 PM, Scott W Dunning wrote: On Mar 1, 2014, at 11:03 AM, Susan Aldridge wrote: Try this def guess1(upLimit = 100): import random num = random.randint(1,upLimit) count = 0 gotIt = False while (not gotIt): print('Guess a number between 1 and', upLi

Re: Help with "Guess the number" script

2014-03-01 Thread Scott W Dunning
On Mar 1, 2014, at 9:35 AM, Dennis Lee Bieber wrote: > Without loops, one part of your assignment is going to be tedious, > unless the intent is to only allow for one guess per run. No, 10 guesses per game. Yes very tedious and repetative. > >> from random import randrange >> randrange(1,

Re: Help with "Guess the number" script

2014-03-01 Thread Chris Angelico
On Sun, Mar 2, 2014 at 12:11 PM, Scott W Dunning wrote: >>print('You got it in ', count, 'guesses.') >> > Thanks Susan! The only problem is he wants us to do it without loops because > we haven’t learned them yet. I need to use the variables and function names > that he’s given as well. I

Re: Help with "Guess the number" script

2014-03-01 Thread Scott W Dunning
On Mar 1, 2014, at 11:03 AM, Susan Aldridge wrote: > Try this > > def guess1(upLimit = 100): >import random >num = random.randint(1,upLimit) >count = 0 >gotIt = False >while (not gotIt): >print('Guess a number between 1 and', upLimit, ':') >guess= int(input())

Re: Help with "Guess the number" script

2014-03-01 Thread Susan Aldridge
Try this def guess1(upLimit = 100): import random num = random.randint(1,upLimit) count = 0 gotIt = False while (not gotIt): print('Guess a number between 1 and', upLimit, ':') guess= int(input()) count += 1 if guess == num: print('

Re: Help with "Guess the number" script

2014-02-28 Thread Ben Finney
Scott W Dunning writes: > Hello, i am working on a project for learning python and I’m stuck. > The directions are confusing me. Please keep in mind I’m very ne to > this. Scott, please default to asking these “covered in a beginner Python course” questions at the Python tutor forum https://mai