Download presentation
Presentation is loading. Please wait.
1
Control structures Chapter 3
2
Topics Assignment statement Selection: if..else
Multi-way selection: switch Repetition: p.88, 89 Functions: setup(), draw(), mousePressed()
3
Repetition Three kinds of loops For loop While loop Do while loop
4
Loops syntax While loop int i =0; while (i < 100) { do something;
i = i + 1; } For loop for (int i =0; i < 100; i = i +1) {
5
Loops syntax (contd.) int i = 0; Do { do something; i = i + 1; } while (i < 100);
6
Lets apply this to drawing some shapes
On to Processing: Draw 10 rectangles of different sizes and at different locations Draw 10 circles of different sizes and at different locations Parameter passing
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.