-1

I am very new to programming and was trying to mess around with inputs. I wrote a simple birthday calculator a few weeks ago:

    name = " # name"
bday = # year of birth
current_year = 2020

age = current_year - bday

print(name.title() + " will turn:")
print(age)
print("this year")

I decided to improve on this concept by using actual input and started messing around in Sublime. it allows me to input the name, but when i press enter, nothing happens.

Here is the input version of the program:

current_year = 2020
name = str(input("what is the name: "))
bday = str(input("what year were they born in: "))

age = current_year - bday

print(name.title() + " will turn:")
print(age)
print("this year")
Chris_Rands
  • 38,994
  • 14
  • 83
  • 119

1 Answers1

0

See your code again when you asks the user to enter the bday then you convert it in str. So except str() use int ().

Yeshwin Verma
  • 282
  • 3
  • 16