Q&A CBSE12A-2016-B01D #6274
Question:
Find and write the output of the following python code:
Values=[10,20,30,40]
for Val in Values:
for I in range(1, Val%9):
print(I,"*",end= "" )
print()
Answer:
| 1* 1* 2* 1* 2* 3* |
() (1, * ) () (1 ,* ) (2 ,* ) () (1, * ) (2, * ) (3, * ) () |
() (1 * ) (1 * 2 * ) (1 * 2 * 3 * ) 1* |
