В чем ошибка | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

В чем ошибка

Написал небольшой код, можно сказать впервые. Хочется понять насколько близок к решению

6th Jan 2022, 1:28 PM
Johny Luma
Johny Luma - avatar
3 Answers
+ 5
#попробуй это coffee = ["Café Latte", "Caffe Americano", "Espresso", "Cappuccino", "Macchiato"] choice = int(input()) if choice => 0 and coffee < 5: print(coffee[choice]) else: print(str(choice) + "error")
6th Jan 2022, 2:39 PM
Simba
Simba - avatar
+ 1
Спасибо то что нужно)))
6th Jan 2022, 2:42 PM
Johny Luma
Johny Luma - avatar
0
coffee = ["Café Latte", "Caffe Americano", "Espresso", "Cappuccino", "Macchiato"] choice = int(input()) if choice => 1 and =< 5: print(coffee[choice]) else: print(choice + "error")
6th Jan 2022, 1:28 PM
Johny Luma
Johny Luma - avatar