forked from megantaylor/Learn-Python-the-Hard-Way
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathex5.py
More file actions
23 lines (19 loc) · 728 Bytes
/
ex5.py
File metadata and controls
23 lines (19 loc) · 728 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
my_name = 'Megan M. Taylor'
my_age = 24 # not a lie
my_height = 74 # inches
my_weight = 151 #lbs
my_eyes = 'Green'
my_teeth = 'White'
my_hair = 'Brown'
convert_centimeters = 2.54
convert_kilos = 0.45359237
print "Let's talk about %s." % my_name
print "She's %d inches tall." % my_height
print "She weighs %d pounds." % my_weight
print "Actually that's not too heavy."
print "She's got %s eyes and %s hair." % (my_eyes, my_hair)
print "His teeth are usually %s depending on the coffee." % my_teeth
# this line is tricky, try to get it exactly right
print "If I add %d, %d, and %d I get %d." % (my_age, my_height, my_weight, my_age + my_height + my_weight)
print my_height * convert_centimeters
print my_weight * convert_kilos