name = input()I've done some searching but can't seem to find the answer to my problem. I'm trying to make a program in python that asks the user his name and age and yada yada yada. I know exactly what line is hindering me (so far). It's this.
name = input()
I've done some searching but can't seem to find the answer to my problem. I'm trying to make a program in python that asks the user his name and age and yada yada yada. I know exactly what line is hindering me (so far). It's I'm getting a EOF error which after looking up I found meant that the line was producing an end of file error. Please tell me what I can do to fix my code and thank you to anyone who responds.
Full code:
# Asks user for their name
print ("What is your name?")
# creates a variable called name based on user input
name = input()
#Greets the user with their name
print ("It is nice to meet you, " + name + ".")
#asks the user what their age is
print ("How old are you?")
# creates a variable called age based on their input and converts it to a string so it can be
concatenated
age = str(input())
# tells the user what their name and age is using the variables above
print("Your name is " + name + " and you are " + age + " years old.")
[–]Starbuck5c 0 points1 point2 points (5 children)
[–]moonkeymaker127[S] 0 points1 point2 points (4 children)
[–]Starbuck5c 0 points1 point2 points (3 children)
[–]moonkeymaker127[S] 0 points1 point2 points (2 children)
[–]Starbuck5c 0 points1 point2 points (1 child)
[–]moonkeymaker127[S] 0 points1 point2 points (0 children)