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
Welcome to the Rebellion Podcast
21 hours agoWhere Do We Go From Here? - WTTR Podcast Live 9/15
461 watching -
LIVE
The Chris Salcedo Show
16 hours agoFALLOUT: Charlie Kirk's Assassination
677 watching -
LIVE
The Bubba Army
2 days agoCharlie Kirk's Shooter, Had a Trans BF? - Bubba the Love Sponge® Show | 9/15/25
2,279 watching -
30:31
DeVory Darkins
14 hours ago $4.73 earnedCNN forced to admit the shocking truth about shooter as Fetterman drops bomb on Democrats
13.2K66 -
20:54
Professor Nez
16 hours ago🚨BREAKING: Shooter’s Own Words in Charlie Kirk Case Revealed
5.05K4 -
16:48
itsSeanDaniel
16 hours agoGenius Republican Defends Charlie Kirk and CALLS OUT The Radical Left
3.54K2 -
9:09
Freedom Frontline
16 hours agoFox News Just Showed The Video Biden Never Wanted Seen
14.6K15 -
0:27
historyofboxing
17 hours ago $0.13 earnedThe Cuban Machine… and Deadliest KO Phenom Right Now – David Morrell Jr
6.55K1 -
38:07
Degenerate Plays
15 hours ago $0.24 earnedWorst Star Wars Character Pranks Us All - Call of Duty: Modern Warfare 3 (2011) : Part 3
5.28K -
LIVE
BEK TV
2 days agoTrent Loos in the Morning - 9/15/2025
150 watching