RESOURCES:
Class slides: https://docs.google.com/presentation/d/1iPT_gnG2iSXXjWj2tE6gbsdg4V0Sy8rY08SC5SoB9CA/edit?usp=sharing
Example code: https://replit.com/@ShravyaS/IntrotoPython-3
(No bullet notes this week.)
HOMEWORK:
Write code to take in two integers: the first represents feet and the second is inches of someone’s height (like 5 feet 4 inches). Print out what the height is in feet with decimal points, then print out what the height is in meters.
Write your answer as a comment, and we’ll post the solution by next class. See you then!
Note: VIP students, please contact us (Eric and I) about office hours!
Solutions:
feet = int(input("How many feet tall are you?")) inches = int(input("How many inches tall are you?")) feet2 = feet + (inches/12) print("You are", feet2, "feet tall!")
print("You are", (feet2*0.3048), "meters tall!")