Previous Lecture | lect04 Before Slides | lect04 Annotated Slides | Next Lecture |
Code from lecture
https://github.com/ucsb-cs16-s18-mirza/cs16-s18-lectures/tree/master/lec-04
Review: Designing nested loops
- When do we need a loop?
- When do we need a nested loop?
- Checking for limits
- Practice with ASCII art (also topic of lab02)
Three key aspects of functions
- Declaration (what are the inputs, outputs?)
- Definition (actual code for achieving the desired behavior)
- Function call (using function)