Lab 9
Midterm prep
Lab 9
Midterm prep
Agenda
This week at a glance:
Midterm Review!
Things to Focus on:
Practice Questions
Debugging Question
This piece of code will make a 10 rectangles next to each other on the x-axis:
color c;
//bool click;
void setup() {
background(200);
c = color(0,0,0);
size(500, 500);
//click = false;
}
void draw() {
//background(200);
if (mousePressed) {
for (int i = 0; i < 10; i = i + 1) {
rect(mouseX + i*20, mouseY, 20, 20);
}
}
}
Review Problems
GOOD LUCK! YOU’ll DO AMAZING!