[Tutor] how to input a name

Learn Python learnpython@hotmail.com
Fri, 04 May 2001 11:14:11 -0000


name=raw_input("name??")
print name
will work.
I guess the problem is that input() expects a python data type
so supplying 'yourname' w'd've worked since it's a string wheareas
just yourname w/o "'"
is'nt one.
raw_input aceepts anything you supply.

karthik.


>From: "Lloyd, Jamie" <LloydJ@missouri.edu>
>To: "Tutor@Python. Org (E-mail)" <tutor@python.org>
>Subject: [Tutor] how to input a name
>Date: Fri, 4 May 2001 06:01:39 -0500
>
>I would like to make a program that would ask for a person's name, then say
>" Hello (persons name)!"
>
>this is what I thought would work...
>
>#!/usr/local/bin/env python
>
>name = input("What is your name?")
>print name
>
>
>But as you can guess this does not work, any suggestions?
>
>
>Jamie Lloyd
>Data Center Tech
>IATS/UCSOperations
>University of Missouri
>
>
>_______________________________________________
>Tutor maillist  -  Tutor@python.org
>http://mail.python.org/mailman/listinfo/tutor

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.