[Tutor] hi

alan.gauld@bt.com alan.gauld@bt.com
Mon, 19 Aug 2002 17:33:08 +0100


> why is this not working?

Because you are getting your types all miuxed up.
You need to go back and read about the difference 
between integers(numbers) and strings(characters)

It looks like you might be reading Josh's tutor and 
I'm sure he covers it somewhere, but alternatively 
jump into mine at the topic called "Raw Materials" 
and read the first half. Without understanding that 
difference you will get into lots of difficulties.

pass = int(raw_input("enter your password: "))

You are converting the password into a number 
- which doesn't make sense.

if pass == idontknow:

You are testing the password against a variable which 
isn't created yet, I think you should be using a string
(ie surrounded by quotes)

    print "Welcome ryan"
    if pass == wizard:
        print "welcome Michael"

The second of is indented too far, you need to pull it 
back to align with the first if...

Alan g.
Author of the 'Learning to Program' web site
http://www.freenetpages.co.uk/hp/alan.gauld