[Solved] how to print string variable in python


From your question

name = input("What is your name: ")
age = int(input("How old are you: "))
year = str((2014 - age)+100)
print(name + " will be 100 years old in the year " + year)

Your code is just fine, change your input to raw_input for name variable.

NOTE: raw_input returns a string, input tries to run as Python expression.

solved how to print string variable in python