I am trying to make a Python script that is a choose your own adventure game. I'm asking what the day is.
day = input ("What is todays date?")
print ("Happy " + day)
For python 2.7
The first thing to note is that if you use input you ask for an integer (1,2,45,6,0,-5). And the thing you want to print is a string (a string are things you need to use quotes for).
To convert the input to a string you need to use
If you want to put the strings together you can simply do that with
So it would become:
day = input ("What is todays date?") print ("Happy " + str(day) + "!")
If using python 3.x you can drop the