Class 12 — Monday February 11
Take 2 — nested looping
It's pillow talk time – For graphical programming – And being visual
Look both ways
Agenda
- Doing loop the loops
For the fun of it
- Reveal one of your super power(s).
- Share a selfie.
Problems
-
Module image_support.py
- How I spent my Sunday — provides some helpful functions to get, create, manipulate, and show Pillow
Images
-
Program sums.py
- Demonstrates nested looping process
0
1
2
3
0
0 0
0 1
0 2
1
1 0
1 1
1 2
2
2 0
2 1
2 2
3
3 0
3 1
3 2
0
0 0 0
0 1 1
0 2 2
1
1 0 1
1 1 2
1 2 3
2
2 0 2
2 1 3
2 2 4
3
3 0 3
3 1 4
3 2 5
0 1 2
1 2 3
2 3 4
3 4 5
-
Program dataset.py
- Demonstrates looping through a two-dimensional in different ways
[['A', 'B', 'C'], ['D', 'E', 'F'], ['G', 'H', 'I'], ['J', 'K', 'L']]
['A', 'B', 'C']
['D', 'E', 'F']
['G', 'H', 'I']
['J', 'K', 'L']
0 ['A', 'B', 'C']
1 ['D', 'E', 'F']
2 ['G', 'H', 'I']
3 ['J', 'K', 'L']
0 ['A', 'B', 'C']
0 0 A
0 1 B
0 2 C
1 ['D', 'E', 'F']
1 0 D
1 1 E
1 2 F
2 ['G', 'H', 'I']
2 0 G
2 1 H
2 2 I
3 ['J', 'K', 'L']
3 0 J
3 1 K
3 2 L
A B C
D E F
G H I
J K L
-
Program chill.py
- Creates a user-specified blank image
Enter width and height of interest: 600 450
-
Program selfie.py
Enter email id: mst3k
-
Program axes.py
Enter email id: mst3k
-
Program test_pattern.py
-
Program peek_a_boo.py
Enter email id: mst3k
-
Program pixel_throwing.py
Enter email id: mst3k
To do list
- Review class artifacts.
- Do chatter.py homework.
- Do digit_box.py homework.