CBSE Class 11 Computer Science Question 38 of 80

Conditional and Looping Constructs — Question 8

Back to all questions
8
Question

Question 7(ii)

Write the output of the following:

for i in [100,200,300] :
   print (i)
Answer
Output
100
200
300
Explanation

The above code iterates through each element in the list [100, 200, 300] using a for loop. During each iteration, it prints the current element i.