Question: Let s be a string contains a weight in kg, such as s = '35 kg' Write a program that interprets the string, and
Let s be a string contains a weight in kg, such as s = '35 kg' Write a program that interprets the string, and convert the weight from kg to pounds, then store the weight in pounds in the result variable. For example, if s - '35 kg', then result = 77. Note: 1 kg 2.2 Ibs. user_code.py 1- def convert_weight(s): result = 0 2 3 print 4 5. 6. 8 return result
Step by Step Solution
3.31 Rating (142 Votes )
There are 3 Steps involved in it
Answer Solution Output de... View full answer
Get step-by-step solutions from verified subject matter experts
