Question 22: Find the output of the following program:
(A) 2 GFGNO
(B) 2.33 GFGNOG
(C) 2.33 GFGNONoneGTrue
(D) 2.33 GFGNO
Explanation: val1 will only have integer and floating values val1 = 1 + 1.33 + 0 = 2.33 and val2 will have string values val2 =’GFG’ + ‘NO’ = ‘GFGNO’. String ‘G’ will not be part of val2 as the for loop will break at None, thus ‘G’ will not be added to val2.
Quiz of this Question
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.