Notes from 9/2
- syntax of the three kinds of loops
- Loops need:
- A control variable.
- The control variable initialized.
- A test for an exit condition.
- Something that moves the loop closer to the exit condition.
- i++, ++i
- i += 1
- Computer lab => experiment
- Scientific method
- Form a hypothesis
- make predictions based on the hypothesis
- test those predictions with experimentation
- repeat as needed
- if (const == var) is better than if (var == const)
- less code means
- Less chance of creating an error
- Easier job of finding errors
- Compile often.