Constructing a program asks the user to enter positive integers, terminated by 0, and whose output is: "yes X", without the quotation marks, if the sequence contains positive values X and form an increasing sequence; otherwise print "no X".
a = int(input("Digite o primeiro valor da sequencia: "))
b = int(input("Digite o segundo valor da sequencia: "))
i=1
if a == 0:
print("nao ", 0)
if a>0 and b == 0:
print("sim ", 1)
while a>0 and b>0:
i=2
c = int(input("Digite outro valor da sequencia: "))
if c>b:
i = i + 1
if c<b:
i = i + 1
a = int(input("Digite algum outro valor da sequencia: "))
b = a
c = b
a = c
if a == 0 and c>b:
print("sim ", i)
if a == 0 and c<b:
print("nao ", i)
if c == 0 and c>b:
print("sim ", i)
if c==0 and b<c:
print("nao ", i)