From last time…
for( int i = 0; i < 100; i++ ) {
println(“loops!”)
}
!

loops!
loops!
loops!
loops!
loops!
loops!
…
Homework 1

CAP
Tips
•

People who drew pictures made fewer mistakes!

•

You can run the code to verify!

•

Remember: the width and heig...
Weighted
Probabilities

CAP
Variable Scope

CAP
System Memory
The Stack

Global Variables
Code

3b. “Pop” local variables
3a. “Push” local variables
2. Load global variab...
Demo!
Variable Scope
Demo!
Asset Creation
Quiz Conditionals, & Loops
2!
Variables,
•

Primitive Types (int, float, boolean)!

•

Variable Declaration and Initializa...
For next time…
•

Read and respond to your proposal feedback!!

•

Read Shiffman, p. 101–107 (Functions I)!

•

Quiz 2 – V...
Upcoming SlideShare
Loading in...5
×

9. Loops II

43

Published on

Published in: Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
43
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

9. Loops II

  1. 1. From last time… for( int i = 0; i < 100; i++ ) { println(“loops!”) } ! loops! loops! loops! loops! loops! loops! …
  2. 2. Homework 1 CAP
  3. 3. Tips • People who drew pictures made fewer mistakes! • You can run the code to verify! • Remember: the width and height arguments are not from center; they are total width & height! • Review: weighted probabilities
  4. 4. Weighted Probabilities CAP
  5. 5. Variable Scope CAP
  6. 6. System Memory The Stack Global Variables Code 3b. “Pop” local variables 3a. “Push” local variables 2. Load global variables 1. Load the code into memory
  7. 7. Demo! Variable Scope
  8. 8. Demo! Asset Creation
  9. 9. Quiz Conditionals, & Loops 2! Variables, • Primitive Types (int, float, boolean)! • Variable Declaration and Initialization! • System Variables (width, height, mouseX, etc.)! • The random() and constrain() functions! • Conditional Statements (if, else-if, else)! • Relational Operators ( < • Logical Operators ( && • For Loops ( for( int i = 0; i < 15; i++) {} ) > || <= >= != == )! ! )!
  10. 10. For next time… • Read and respond to your proposal feedback!! • Read Shiffman, p. 101–107 (Functions I)! • Quiz 2 – Variables, Conditionals, & Loops
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×