29. Python Program to read Positive numbers continuously until Negative number.
How does this program work?
- In this program you will learn about how to read positive numbers continuously until negative number in given array of numbers using Python.
Here is the code
a = (1,5,4,9,8,-5,5,4,6 )
i = 0
#To print array numbers
print("Given numbers")
print(a)
for i in a:
print(i)
#Condition to check given number either positive or negative
if i<=0:
break;