Skip to content

Commit c582bd0

Browse files
author
Charlotte Weaver
committed
Added solution to lesson 1
1 parent 5c338e1 commit c582bd0

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)