Write a program that takes a person's age as input and prints out the year they were born. Assume the current year is 2023. The program should: - Take the user's current age as input (an integer) - Calculate the year they were born by subtracting their age from the current year - Print the calculated birth year as output
Taking user's input
Calculate birth year from current age
Report a typo
Sample Input 1:
25Sample Output 1:
1998Sample Input 2:
50Sample Output 2:
1973Write a program in Python 3
# Take the user's current age as input
current_age = int(input())
# Current year
current_year = 2023
# Calculate the birth year
# Print the birth year
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.