Question: ( 2 0 points ) Problen 3 ( Use input coimiand, a while loop for error message and ontput coingand furint? The speed of a
points Problen Use input coimiand, a while loop for error message and ontput coingand furint?
The speed of a sound wave is affected by the temperature of the alr. At the speed of a sound wave The speed lacreases by approximately for every degree in Celsius above ; thls is a reasorsably wcourate approxtmation for degrees So our equation for the speed in terns of a temperature is:
speed
Write a user defined function "soundtemp" that will prompt the user for a temperature in Celsius in the range fromi to inelusive and will calculate and print the speed of sound at that temperature. If the user eaters a temperature in that range, or an error messape if not. The format of the input and outpot isessages are givea below
User prompt input
Enter a temp in the range to :
If user enter a number below or higher than then display the belaw error message
Error in temperature. Try a different namber.
Desplay output
For a temperature of XX the speed is
Disclaimer: Solve the code using the knowledge you learned fUse inpat command, a while loop for error ueskage and output command fprints. 'for loop', canmot be used lim your code hi class without relying ou Al tools.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
