Premium Only Content

For Loop with Multiple Lists |Section 4|Celestial Warrior
In one of the previous exercises we created the following function that gets Celsius degrees as input and returns Fahrenheit, or a message if the Celsius inputvalue is less than -273.15.
def c_to_f(c):
if c< -273.15:
return "That temperature doesn't make sense!"
else:
f=c*9/5+32
return f
Please implement a for loop that iterates through the following temperatures list temperatures=[10,-20,-289,100]and calls the above c_to_f function in each iteration. In other words, this timeyou are using the function to calculatea series of values instead of just one value.
The expected output:
50.0
-4.0
That temperature doesn't make sense!
212.0
temperatures=[10,-20,-289,100]
def c_to_f(c):
if c< -273.15:
return "That temperature doesn't make sense!"
else:
f=c*9/5+32
return f
for t in temperatures:
print(c_to_f(t))
-
LIVE
CassaiyanGaming
1 hour ago🟢LIVE - BATTLEFIELD 6 - MEDIC SHIFT - Doing My Duty
45 watching -
46:10
X22 Report
2 hours agoMr & Mrs X - ICE Is A Threat To The [DS] Agenda, The ICE Insurgency Will Fail - EP 12
58.2K19 -
LIVE
Shield_PR_Gaming
2 hours ago10/18/25 | WARNING!!! 18+ Battlefield 6 Dev Dogtags?
29 watching -
LIVE
Lofi Girl
2 years agoSynthwave Radio 🌌 - beats to chill/game to
113 watching -
LIVE
SilverFox
14 hours ago🔴LIVE - ARC RAIDERS SERVER SLAM TEST! DAY 2!
33 watching -
2:03:11
LFA TV
16 hours agoTHE RUMBLE RUNDOWN LIVE @9AM EST
103K13 -
LIVE
MrR4ger
2 hours agoWERE NOT GAY, WE JUST PLAY ARC RAIDERS W/ TONYGAMING AND AKAGUMO
32 watching -
LIVE
Retro Rewind Pod
12 hours ago📺🌄 SATURCADE ADVENTURES is back! Saturday Morning Cartoon Feels and Gaming Fun
9 watching -
43:57
Daniel Davis Deep Dive
3 hours agoDeep Dive Intel Briefing /Lt Col Daniel Davis
3.83K3 -
LIVE
blackfox87
4 hours ago🟢 SUBATHON DAY 16 | Premium Creator | #DisabledVeteran
128 watching