+ 2
Help me please. / Помогите мне пожалуйста.
x = input("") if int(x) > 7: print("qwerty") elif int(x) == 7: print("123456") elif int(x) < 7: print("Access") elif int(x) == 9: while int(x) <= 19: print(x) x = int(x) + 1 How to make sure that "qwerty" is not printed, if the input is 9? / Как сделать чтобы не печаталось "qwerty", если ввод 9?
3 ответов
+ 7
Just add another condition to it.
if int(x) > 7 and int(x) != 9:
print("qwerty")
+ 4
put the x==9 condition on top
+ 3
Or:
Help me please. / Помогите мне пожалуйста.
x = input("")
if x == 9:
while int(x) <= 19:
print(x)
x = int(x) + 1
elif int(x) > 7:
print("qwerty")
elif int(x) == 7:
print("123456")
elif int(x) < 7:
print("Access")