[Tutor] Storing Info

alan.gauld@bt.com alan.gauld@bt.com
Wed, 17 Apr 2002 18:12:37 +0100


> print "Notes Program."
> print "Type in "null" if you do not wish to add a note."

You have embeddeed quotes within quotes. 
You need to use single quotes on the outside...

> 
> notes = raw_input("Enter a note/Reminder:")
> while notes <= "":

Are you sure you mean <= ie less than or equal?
I suspect that should be == for equals.

> 	print "That's a rather short note!"
> 	notes = raw_input("Enter a note/Reminder:")
> if notes == "null"
> 	break

The if claess needs to be indented to the same level 
as the notes= line, otherwise its seen by python as 
being outside the loop.

> starting to think I'm in way over my head.  

No, you are pretty close.

> I was thinking maybe I'd have to import the info, 
> or something similar (I have no idea)

No you are reading it from the user.
Of course in the real world you probably want to store 
the notes in a file or something but that can wait till 
later ;-)

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