-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathex05.rb
More file actions
22 lines (19 loc) · 826 Bytes
/
ex05.rb
File metadata and controls
22 lines (19 loc) · 826 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
my_name = 'Zed A. Shaw'
my_age = 35 # not a lie in 2009
my_height = 74 # inches
my_weight = 180 # lbs
my_eyes = 'Blue'
my_teeth = 'White'
my_hair = 'Brown'
my_heigh_centimeters = my_height * 2.54
my_weight_in_kgs = my_weight * 0.453592
puts "Let's talk about #{my_name}."
puts "He's #{my_height} inches tall."
puts "He's #{my_weight} pounds heavy."
puts "Actually that's not too heavy."
puts "He's got #{my_eyes} eyes and #{my_hair} hair."
puts "His teeth are usually #{my_teeth} depending on the coffee."
# this line is tricky, try to get it exactly right
puts "If I add #{my_age}, #{my_height}, and #{my_weight} I get #{my_age + my_height + my_weight}."
puts "My height in inches is #{my_height} which is #{my_heigh_centimeters} in centimeters"
puts "My weight in lbs is #{my_weight} which is #{my_weight_in_kgs} in kgs"