Will a For loop execute without initialization? explain with examples.
Answers
Answered by
1
Answer:
Yes!
A For loop will only execute if initialisation has not been done.
If initialisation has been done, the software will give an error...
e.g. ->
for x in range(1,10,1):
print(x)
else:
print('Loop has ended')
Answered by
0
Answer:
Answer is in above pic..............
Attachments:
Similar questions