[Tutor] Help with a tutorial

Danny Yoo dyoo@hkn.eecs.berkeley.edu
Wed Jul 23 16:07:28 2003


On Wed, 23 Jul 2003, Jared W wrote:

> http://www.honors.montana.edu/~jjc/easytut/easytut/node14.html
>
> I know this is should be really easy, but I couldn't figure it out


Hi Jared,


Hmmm..., now that I look at it, the question itself is weird!  And I'm
having difficulty parsing it in English... *grin*


Here's the question Josh poses:


"""
Rewrite the high_low.py program from section 5.2 to use the last two
digits of time at that moment to be the 'random' number.
"""



I think there's a phrasing mistake here --- the question is probably meant
to be a two-parter:


"""
Rewrite the high_low.py program from section 5.2:

    1.  To use the last two digits of time at that moment.

    2.  To be the 'random' number.
"""

Can anyone confirm that this is what Josh meant?  If so, we need to send
this correction to him so that he can fix his tutorial.



Anyway, Jared, does this clarify things?  Try adjusting the high_low.py
program:

###
number = 78
guess = 0

while guess != number :
    guess = input ("Guess a number: ")

    if guess > number :
        print "Too high"

    elif guess < number :
            print "Too low"

print "Just right"
###


so that the 'number' isn't hardcoded to the number 78.  Please feel free
to ask more questions about this, and try explaining what part is getting
you stuck.



Good luck to you!