Hello, here's a tiny little program I wrote:
import random print(""" This is a magic super computer. He will ask you a couple of questions. An ultra-complicated algorithm will then figure out what your favorite meal is. """) name = str(input("What is your name? ")) age = int(input("How old are you? ")) birthplace = str(input("Where are you born? ")) meal = random.randint(1, 3) if meal == 1: print("Well, " + name + " as a " + str(age) + " year old human being born in " + birthplace + " you probably like hamburgers.") elif meal == 2: print("Well, " + name + " as a " + str(age) + " year old human being born in " + birthplace + " you probably like sushi.") elif meal == 3: print("Well, " + name + " as a " + str(age) + " year old human being born in " + birthplace + "you probably like pizza.") Here's the error message I am getting: Traceback (most recent call last): File "/home/rafael/Documents/3_Tufcik.py", line 13, in <module> name = str(input("What is your name? ")) File "<string>", line 1, in <module> NameError: name 'Rafael' is not defined Can anyone help? Thanks in advance! Rafael
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor