> import random #import random number generator module
> target = random.randint(1,100) #generates random number between 1 and 100
> guess = float(raw_input('pick a number between 1 and 100'))
> while guess != target:
> if guess < target: print 'too low'
> elif guess > target: print 'too high
First off I want to really thank you for all of the help! I am in my
first semester as I started as a non traditional student in January.
Even though I am in an intro class I think that many of my class mates
had more of a c/s foundation in high then I did. It took me a few
tries but I did finally
Carolina Dianne LaCourse wrote:
[...]
I understand that I need to ask for raw input from the user and that I
need to be able to use the if elif else to tell the user whether their
number matches or id too high or to low but am just not sure what to
do first. Any advice would be greatly appreciat
On 2/24/2012 10:18 PM, Carolina Dianne LaCourse wrote:
Hi,
I have never programed before and am brand new to python also. I am
trying to create a Hi-Lo game and am not really sure where to start.
These are the instructions that I have. I know that I will need to
import the random number generator
Hi,
I have never programed before and am brand new to python also. I am
trying to create a Hi-Lo game and am not really sure where to start.
These are the instructions that I have. I know that I will need to
import the random number generator and have looked up how to do that.
I understand that I n