Q&A CBSE12A-2015-B01F #6347
Question:
What are the possible outcome(s) executed from the following code? Also specify the maximum and minimum values that can be assigned to variable COUNT.
TEXT="CBSEONLINE"
COUNT=random.randint(0,3)
C=9
while TEXT[C]!='L':
print TEXT[C]+TEXT[COUNT]+'*',
COUNT=COUNT+1
C=C1
(i) (ii) (iii) (iv)
EC*NB*IS* NS*IE*LO* ES*NE*IO* LE*NO*ON*
Answer:
(i) EC*NB*IS*
(iii) ES*NE*IO*
Minimum COUNT = 0 Maximum COUNT = 3
