Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
学ぶ Else | While Loops: Essentials
Python Loops
セクション 2.  5
single

single

bookElse

メニューを表示するにはスワイプしてください

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.

1234
while condition: inctructions... else: instructions...
copy
タスク

スワイプしてコーディングを開始

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.

解答

Switch to desktop実践的な練習のためにデスクトップに切り替える下記のオプションのいずれかを利用して、現在の場所から続行する
すべて明確でしたか?

どのように改善できますか?

フィードバックありがとうございます!

セクション 2.  5
single

single

AIに質問する

expand

AIに質問する

ChatGPT

何でも質問するか、提案された質問の1つを試してチャットを始めてください

some-alt