Advertisements
Advertisements
प्रश्न
What possible output is expected to be displayed on the screen at the time of execution of the Python program from the following code?
import random
L=[10,30,50,70]
Lower=random.randint(2,2)
Upper=random.randint(2,3)
for K in range(Lower, Upper+1):
print(L[K], end="@")पर्याय
50@70@
90@
10@30@50@
10@30@50@70@
MCQ
Advertisements
उत्तर
50@70@
Explanation:
Lower is always 2, and Upper can be 2 or 3.
So the loop prints elements from index 2 to 3 → L[2] = 50, L[3] = 70, giving 50@70@.
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
