+3 votes
in Class 12 by kratos

What possible outputs() are expected to be displayed on screen at the time of **** of the program from the following code? Also specify the maximum values that can be assigned to each of the variables FROM and TO.

import random

AR = [20,30,40,50,60,70];

FROM = random.randint(1,3)

TO = random.randint(2,4)

for K in range(FROM,TO + 1):

print (AR[K],end=”# “)

(i) 10#40#70#

(ii) 30#40#50#

(iii) 50#60#70#

(iv) 40#50#70#

1 Answer

+2 votes
by kratos
 
Best answer

(ii) 30#40#50# Maximum value FROM,TO is (3,4)

...