Homework 1
The deadline is Friday, the 9th of September, 23:59 (Estonian time).
You have decided to visit the United States of America. On your first day, you hear people talking about how tall they are in feet, and all the things are weighed in pounds. You soon realize that they use the imperial system instead of the metric system like most of Europe.
Write a program that
- asks the user for the user's name, height in centimeters, and weight in kilograms, and
- calculates and outputs the height in feet and weight in pounds. Use the following ratios for your calculations: 1 cm = 0.0328 ft and 1 kg = 2.20 lb. Round the answer to 1 decimal (you can use round for that, e.g.
round(2.55,1)
will give2.6
).
Example:
>>> %Run solution.py
Enter your name: Chuck
Enter your height in cm: 180
Enter your weight in kg: 80
Hi Chuck, your height is 5.9 ft and weight 176.0 lb
If you have been struggling with this exercise for some time, maybe you can get help from troubleshooter: https://progtugi.cs.ut.ee/#/ts/62024a756449631d0c385dce/
. It tries to explain the most common problems and give hints.
Go to Moodle and upload your solution into Homework 1.