Write a program that asks for the birth year of the user, then outputs the person’s age, and the number of years before a person can earn a driver’s license.
Depending on whether your birthday has already occurred this calendar year, please adjust your formula accordingly.
You will write this in a script called `milestones.py`, which should output these three lines. After those three lines, please add more milestones of your own such as the number of years before a person can legally vote, drink, etc.
-!- CODE language-text -!-What's your birth year? 2008
You're 14 year(s) old.
In 2 year(s), you can earn your driver's license!
CodeGrade is your virtual teaching assistant in your Python classroom. You teach, CodeGrade takes care of the rest.
Our 35 built-in fully automatically graded Introduction to Programming assignments are designed especially for middle school and high school coding education, in close collaboration with Harvard-Westlake School (Los Angeles, CA). You can start teaching Python at your school with confidence now. Or, easily scale your classroom with CodeGrade's tools.
Book a personal 30-minute demo now and we'll show you how to get started with CodeGrade in less than 1 hour!