Introduction to Programming using Python 1st Edition

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

Chapter 2 - Elementary Programming - Programming Exercises - Page 57: 2.9

Answer

Step 3 of 3 Sample Output: Enter the temperature in Fahrenheit between $-58$ and 41: $5.3$ Enter the wind speed in miles per hour: 6 The wind chill index is $-5.56707$

Work Step by Step

Step 1 of 3 Program Plan: Create a python file with name 2_9PE.PY. In the file, - Get input from user. It is the outside temperature. - Also get the wind speed in miles from user. - Calculate coldness using wind speed and temperature with the formula given in question itself. - Display the wind chill index or coldness. Step 2 of 3 Program: # Prompt the user for outside temperature temp = eval(input("Enter the temperature in Fahrenheit between -58 and 41: ")) # Prompt the user for wind speed speed $=$ eval(input ( "Enter the wind speed in miles per hour: ")) # Calculate coldness using wind speed and temperature coldness $=35.74+0.6215^{*}$ temp $-35.75^{*}$ speed $^{* *} 0.16+0.4275^{*}$ temp $^{*}$ speed** $0.16$ #Display the wind chill index or coldness print("The wind chill index is ", round(coldness, 5$)$ ) Step 3 of 3 Sample Output: Enter the temperature in Fahrenheit between $-58$ and 41: $5.3$ Enter the wind speed in miles per hour: 6 The wind chill index is $-5.56707$
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.