diff --git a/kjg/python-the-hard-way/e5.py b/kjg/python-the-hard-way/e5.py new file mode 100644 index 0000000..a7e62bc --- /dev/null +++ b/kjg/python-the-hard-way/e5.py @@ -0,0 +1,18 @@ +my_name = 'Zed A. Shaw' +my_age=35 # notalie +my_height = 74 # inches +my_weight = 180 # lbs +my_eyes = 'Blue' +my_teeth = 'White' +my_hair = 'Brown' + +print(f"Let's talk about {my_name}.") +print(f"He's {my_height} inches tall.") +print(f"He's {my_weight} pounds heavy.") +print("Actually that's not too heavy.") +print(f"He's got {my_eyes} eyes and {my_hair} hair.") +print(f"His teeth are usually {my_teeth} depending on the coffee.") + +# this line is tricky, try to get it exactly right +total = my_age + my_height + my_weight +print(f"If I add {my_age}, {my_height}, and {my_weight} I get {total}.") diff --git a/kjg/python.org b/kjg/python.org index 885fb90..5c59d47 100644 --- a/kjg/python.org +++ b/kjg/python.org @@ -43,3 +43,12 @@ There will be 70 empty cars today. We can transport 120.0 people today. We have 90 to carpool today. We need to put about 3.0 in each car. + +**** ex5 +Let's talk about Zed A. Shaw. +He's 74 inches tall. +He's 180 pounds heavy. +Actually that's not too heavy. +He's got Blue eyes and Brown hair. +His teeth are usually White depending on the coffee. +If I add 35, 74, and 180 I get 289.