Skip to content

Latest commit

 

History

History
15 lines (11 loc) · 576 Bytes

exercise.md

File metadata and controls

15 lines (11 loc) · 576 Bytes

Continue

Objectives

  1. Define the following
    1. A variable called sum with the value of 0
    2. A for loop that iterates a variable called i starts with the value 0 until it reaches 100 (the variable's value is incremented by 1 each loop)
      1. If the value of i is 50, skip increasing the value of sum by i
      2. each loop, make sure to add the value of i to the value of sum
    3. after the loop definition, add print statement to print the value of sum
      1. What's the value of sum?

Solution

Click here to view the solution.