Episode 13 - Loops

Exercises

  1. Create a program that counts by 2's: 2, 4, 6, 8, etc. until it reaches 100.
  2. Create a program that asks a user for 10 numbers and then returns the sum.
  3. Create a program that calculates averages. The program will first ask the user how many numbers they'd like to enter. Then, the program will prompt the user to enter each number. Finally, the program will tell the user the average of all of the numbers. Remember: To find the average of numbers, you get the sum of all the numbers and divide that sum by the count of how many numbers there are. For example, if the user enters: 11, 7, 30, 22, 55 the average will be 25. This is because 11 + 7 + 30 + 22 + 55 = 125, and 125 / 5 (the amount of numbers in the list) = 25.