Class 13 — Monday February 11

Take 2 — nested looping

It's pillow talk time – For graphical programming – And being visual


Look both ways


Agenda


Feedback


If you have not yet done so, for the fun of it


Downloads


To do list


Another take on nested looping — building a table

Three program runs

Enter number of rows: 2

Enter number of columns: 5

Enter a word: banana

row: o

row: 1  

row: 0 column: 0

row: 0 column: 1

row: 0 column: 2  

row: 0 column: 0

row: 0 column: 1

row: 0 column: 2

row: 0 column: 3

row: 0 column: 4

row: 1 column: 0

row: 1 column: 1

row: 1 column: 2

row: 1 column: 3

row: 1 column: 4

[83, 43, 11, 14, 19]

[88, 27, 84, 15, 92]

[[83, 43, 11, 14, 19], [88, 27, 84, 15, 92]]

Enter number of rows: 2

Enter number of columns: 5

Enter a word: lemon

row: o

row: 1  

row: 0 column: 0

row: 0 column: 1

row: 0 column: 2  

row: 0 column: 0

row: 0 column: 1

row: 0 column: 2

row: 0 column: 3

row: 0 column: 4

row: 1 column: 0

row: 1 column: 1

row: 1 column: 2

row: 1 column: 3

row: 1 column: 4

[82, 22, 39, 46, 31]

[59, 98, 65, 30, 60]

[[82, 22, 39, 46, 31], [59, 98, 65, 30, 60]]

Enter number of rows: 4

Enter number of columns: 3

Enter a word: apple

row: 0

row: 1

row: 2

row: 3  

row: 0 column: 0

row: 0 column: 1

row: 0 column: 2  

row: 1 column: 0

row: 1 column: 1

row: 1 column: 2  

row: 2 column: 0

row: 2 column: 1

row: 2 column: 2  

row: 3 column: 0

row: 3 column: 1

row: 3 column: 2  

[53, 25, 27]

[73, 69, 67]

[95, 33, 57]

[96, 18, 99]  

[[53, 25, 27], [73, 69, 67], [95, 33, 57], [96, 18, 99]]



Imaging

Enter width and height of interest: 600 450

Alice Blue Canvas


Enter email id: mst3k

selfie


Enter email id: mst3k

horizontal line across selfie axes across selfie


Enter image width and height (pixels): 600 450


Enter email id: mst3k

randomized selfie


Enter email id: mst3k

axes across selfie horizontal line across selfie




random number generator blackbox

 


 

 

 
   
   
   
 
  © 2019 Jim Cohoon   Resources from previous semesters are available.