CBSE Class 11 Computer Science Question 93 of 161

Flow of Control — Question 2

Back to all questions
2
Question

Question 2

Under what conditions will this code fragment print "water"?

if temp < 32 :    
   print ("ice")  
elif temp < 212:  
   print ("water")
else :            
   print ("steam")

Answer

When value of temp is greater than or equal to 32 and less than 212 then this code fragment will print "water".

Answer