B01F-2019S – Computer Sir Ki Class

Login


Lost your password?

Don't have an account ?
Register (It's FREE) ×
  

Login
[lwa]



Exam Questions-CBSE12A-2019-B01F #PYTHON#7096    siteicon   siteicon  

Problem Statement - B01F-2019S

What possible output(s) are expected to be displayed on screen at the time of execution of the program from the following code ? Also specify the minimum values that can be assigned to each of the variables BEGIN and LAST.

import random
VALUES=[10,20,30,40,50,60,70,80]
BEGIN=random.randint(1,3)
LAST=random.randint(BEGIN,4)

for I in range(BEGIN, LAST+1):
print VALUES[I],"-",
(1) 30 – 40 – 50 – (ii) 10 – 20 – 30 – 40 –
(iii) 30 – 40 – 50 – 60 – (iv) 30 – 40 – 50 – 60 – 70 –

Solution

TC++ #7096


Share

CSKC| Created: 10-Apr-2019 | Updated: 10-Apr-2019|CBSE12A-2019









Back