We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5c338e1 commit c582bd0Copy full SHA for c582bd0
1 file changed
Lesson01_Variables/MilestonesSOLUTION.py
@@ -0,0 +1,12 @@
1
+birth_year = raw_input("What is the birth year for the milestones?")
2
+# raw_input always gives strings, so convert to int
3
+birth_year = int(birth_year)
4
+
5
+# Calculate milestone years
6
+driving_year = birth_year + 16
7
+drinking_year = birth_year + 21
8
+president_year = birth_year + 35
9
10
+print "You are able to drive in " + driving_year
11
+print "You are able to drink in " + drinking_year
12
+print "You are able to run for president in " + president_year
0 commit comments