Printing user input?
Mohammed_M
Moh989 at gmail.com
Thu Nov 15 12:03:26 EST 2007
Hi,
I'm v.new to Python, so please don't be too harsh :)
I get a NameError with the code below - All I want to do is store some
input taken from the user in a variable called name, & then print name
# START CODE ==========================================
# Print name demo
def PersonsDetails():
name = input("What's your name?")
PersonsDetails()
print(name)
# END CODE ==========================================
Thanks for reading & any help on this
More information about the Python-list
mailing list