Секція 2. Розділ 5
single
Else
Свайпніть щоб показати меню
else can be used not only inside if-else statements but after loops. Instructions after else statement are executing after exiting the loop but not because of break. If you leave the loop because of break, else instructions are skipped.
1234while condition: inctructions... else: instructions...
Завдання
Проведіть, щоб почати кодувати
For the given list list_, check if all elements in it are positive. Print YES or NO. Use break to leave the loop if a non-positive number appears.
Рішення
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 2. Розділ 5
single
Запитати АІ
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат