IDNLearn.com: Your trusted source for finding accurate answers. Ask anything and receive comprehensive, well-informed responses from our dedicated team of experts.

what will be the output for;
for i in range(1,6):
if i==3:
print('hello')
break
else:
print(i)
print('done')


Sagot :

The output for; for i in range(1,6): if i==3: print('hello') break else: print(i) print('done') the output for the given Python program is 001020340.

What is range () in Python?

The python range() function creates a collection of numbers on the fly, like 0, 1, 2, 3, 4. This is very useful, since the numbers can be used to index into collections such as string. The range() function can be called in a few different way.

  1. The given program is as:
  2. i =0
  3. while i < 5
  4. print(i)
  5. i +=1
  6. if i==3 :
  7. break
  8. else:
  9. print(0)
  10. It will give the following as result 001020340
  11. Hence, the answer is 001020340.

Read more bout the python :

https://brainly.com/question/26497128

#SPJ1

Your participation means a lot to us. Keep sharing information and solutions. This community grows thanks to the amazing contributions from members like you. Thank you for choosing IDNLearn.com. We’re dedicated to providing clear answers, so visit us again for more solutions.