Проблема с continue

LonelyWorld

Новичок
Пользователь
Ноя 8, 2020
5
0
1
Python:
a = int(input())
while a > 9 and a < 101:
    print(a)
    if a > 100:
        break
    if a < 10:
        continue
    else:
        a = int(input())

Test input:
12
4
2
58
112
Correct output:
12
58

Your code output:
12
 

regnor

Модератор
Команда форума
Модератор
Июл 7, 2020
2 625
469
83
Python:
while True:
    a = int(input())
    if 9 < a < 101:
        print(a)
    elif a > 100:
        break
    elif a < 10:
        continue
 

Форум IT Специалистов