Introduction to Programming using Python 1st Edition

Published by Pearson
ISBN 10: 0132747189
ISBN 13: 978-0-13274-718-9

Chapter 5 - Loops - Programming Exercises - Page 159: 5.5

Answer

Kilograms Pounds | Pounds Kilograms 1 2.2 | 20 9.09 3 6.6 | 25 11.36 ... 197 433.4 | 510 231.82 199 437.8 | 515 235.09

Work Step by Step

print(format("Kilograms", "<15s"), format("Pounds", "10s"), " | ", format("Pounds", "<15s"), format("Kilograms", "10s")) print("-----------------------------------------------------------------") kilograms = 1 pounds = 20 count = 1 while count <= 100: print(format(kilograms, "<15d"), format(kilograms * 2.2, "<10.1f"), " | ", format(pounds, "<15d"), format(pounds / 2.2, "<10.2f")) kilograms += 2 pounds += 5 count += 1
Update this answer!

You can help us out by revising, improving and updating this answer.

Update this answer

After you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback.