Question: Write the code for the function tenpoescription. It should take tenp as a parameter that represents a temperature in degress Fi a should return the
Write the code for the function tenpoescription. It should take tenp as a parameter that represents a temperature in degress Fi a should return the string "Hot" if the ternp is above 8a, "Warm" if it is not above 80 but is above 70 , "Coot" it it is not above 70 but is above 60, and "Cold" otherwise (belou 60). Hint: You dent have to solve it all at onco. You can start with just an if that only handles fempls greater than 60 . Then add an eTif to handle the Waim tamp. Then add one for Cool.i.. Make sure to retarn the arwwers and not jurt print them. Original - t ef 1 det cenpbescription (temp)1 - Tour code Bere A main part pt progcan descriptiont = teepbescription (ss) prtane descriptionl 3 desoriptlan2 - tempbeseription (75) printi deseriptionz ) 3 dewoription3 - tenppesoription (65) 10) print ( deseriptianj ) 11 deactiptioes - tenpbeecript ion (42). 12. belint deacription 3 17. deseriptions - tenpbeEcripe ion (70) 14 printy dencrlptions y =houlat be cool
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
