[Tutor] Newbie question re: user interaction

First Name Last Name dis_gus_ted@my-deja.com
Thu, 1 Feb 2001 00:05:25 -0800

    I'm a clueless newbie who has been self-teaching Python (and programming) for approximately one week.  I have made my stab at immortality by writing a random-name generator and submitting it to the Useless Python Scripts page.

Anyway, I understand enough of Python to look up the bits I don't remember in the manual, write simple functions, &c.  The part in my manual (O'Reilly 'Learning Python') about classes is complete gibberish to me, but I'm sure that will change in time.

Anyway, what I'm writing to ask about is, how do I do the equivalent of the following BASIC function in Python?

10 INPUT "What is your name?" N$
20 PRINT "Hello, " N$ "!"

This is a staggeringly simple piece of code and I instinctively feel that a well-designed language like Python must have a simple and elegant way of replicating it.  However, all I've managed to gather from the manual is that if I do something horribly complicated with the cmd module then I might be able to do something that vaguely mimics the code above.  Please tell me I'm wrong!

Thanks very much for any help, Gus Hungerford.

--== Sent via Deja.com ==--