Westonci.ca connects you with experts who provide insightful answers to your questions. Join us today and start learning! Explore a wealth of knowledge from professionals across various disciplines on our comprehensive Q&A platform. Connect with a community of professionals ready to provide precise solutions to your questions quickly and accurately.

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