Advertisements
Advertisements
Question
Identify the correct output(s) of the following code. Also write the minimum and the maximum possible values of the variable b.
import random
a = "Wisdom"
b = random.randint(1, 6)
for i in range(0, b, 2):
print(a[i], end='#')
Options
W#
W#i#
W#s#
W#i#s#
MCQ
Solution
W#, W#s#
Minimum and maximum possible values of the variable b: 1, 6.
shaalaa.com
Is there an error in this question or solution?