Loading...

Python 06: Loops
Quiz by Jonathan Saurine
Tag the questions with any skills you have. Your dashboard will track each student's mastery of each skill.
What is the output of the following Python code?<p><pre><code>numbers = [1, 2, 3, 4, 5]<br>sum = 0<br>for num in numbers: <br> sum += num<br>print(sum)</pre></code></p>
What is the output of the following Python code?<p><pre><code>fruits = ["apple" "banana", "cherry"]<br>for fruit in fruits:<br> print(fruit)</code></pre></p>