セクション 5. 章 2
single
Challenge: Working with the While Loop
メニューを表示するにはスワイプしてください
タスク
スワイプしてコーディングを開始
You are given the variable i for iterating through the list and the list squares, which should store the squares of numbers from 1 to 10.
- Use
a**bto raise the numberato the power ofb. - Assign the value 1 to the variable
iin order to start the iteration. - Create a
whileloop that will iterate through the numbers from 1 to 10, inclusive. - Inside the
whileloop, write the square ofi(iraised to the power of 2) into thesquareslist using the.append()method. - Increment
iby 1 to continue iterating through the loop.
解答
すべて明確でしたか?
フィードバックありがとうございます!
セクション 5. 章 2
single
AIに質問する
AIに質問する
何でも質問するか、提案された質問の1つを試してチャットを始めてください