Answer to Question #347363 in Python for D.B

Question #347363

Write a program that ask the user to enter the current year and the year of birth. Then, the program should compute the age by subtracting the year of birth from the current year and display the result (which represents the age). Use the following formula: 𝐴𝑔𝑒 = π‘π‘’π‘Ÿπ‘Ÿπ‘’π‘›π‘‘ π‘¦π‘’π‘Žπ‘Ÿ βˆ’ π‘π‘–π‘Ÿπ‘‘β„Ž π‘¦π‘’π‘Ž


1
Expert's answer
2022-06-02T10:26:59-0400
cur_year = int(input("current year: "))
birth_year = int(input("year of birth: "))
print("age =", cur_year - birth_year)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS