age = input("Enter your age: ")
print("You are " +age+ " years old.")
add_age = input("How much older do you want to be?:")
new_age = int(age + add_age)
print("Congrats! You are now " +new_age+ " years old!")
This is probably one of the easiest and simple fixes, but I've been learning python for about 1 day and I cannot get my head around this error. My code is noted above. I tried with Line 3
new_age = int(age + add_age)
without the int(), but it returns the two texts added together, not the numerical input.
Hopefully, someone can assist me.
Thanks in advance!
Edit: Ouch, rough crowd... New learner and user of the website, thought I'd get a little more leniency in asking a duplicate question. In my defense, I searched for my question before asking and there were topics which came up, but they didn't exactly reach into my exact problem of converting to achieve the value I needed. Maybe they did, but there was a lot of information and as a new learner, everything looks like a jargled mess to me at the moment. Anyways, apologies for the duplicate.