Westonci.ca is the ultimate Q&A platform, offering detailed and reliable answers from a knowledgeable community. Join our platform to connect with experts ready to provide precise answers to your questions in different areas. Get detailed and accurate answers to your questions from a dedicated community of experts on our Q&A platform.

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