Lists and Loops - Activity

Lists and Loops

Make sure you attempt the activity on your own before checking out the solution.

Instructions

Using a pencil and paper or a flowcharting software, design the following program:

  • A program that holds a list of numbers and, when a button is clicked, sums the numbers and displays the sum.
Solution

This was a very complex problem, and it's okay if you weren't able to solve it. What's important is working to develop the skills to think like a programmer.



Array Sum