+3 votes
in Class 12 by kratos

Observe the following Python code and find out , which out of the given options (i) to (iv) are the expected correct output(*). Also assign the maximum and minimum value that can be assigned to the variable ‘Go’.

import random

X =[100,75,10,125]

Go = random.randint(0,3)

for i in range(Go):

print X[i],"$$",

i. 100$$75$$10

ii. 75$$10$$125$$

iii. 75$$10$$

iv.10$$125$$100

1 Answer

+4 votes
by kratos
 
Best answer

100 $$ 75 $$ 10 $$

Minimum Value that can be assigned to Go is 0

Maximum Value that can be assigned to Go is 3

...