Introduction to Computational Thinking Blockly Lists & Iteration
CT @ VT Things we are seeing Using lists to represent a data stream Blockly blocks for iteration Using iteration to process a data stream (i.e., a list) Different patterns for processing a data stream Uniform Accumulate Filter Transform Spring 201 2015 Slide 2
CT @ VT Patterns Uniform: perform the same processing on each element of the list Accumulate: determine a property of the list Filter: use a decision to select some elements of the list for processing Transform: produce a new list by processing the elements of an existing list Spring 201 2015 Slide 3
CT @ VT Thinking about iteration middle start end Spring 201 2015 Slide 4
CT @ VT Accumulate pattern middle property property Spring 201 2015 Slide 5
CT @ VT Finding the total middle 10 7 15 9 14 2 4 32 34 10 7 2 14 4 15 9 Spring 201 2015 Slide 6
CT @ VT Finding the total beginning 10 7 15 9 14 2 4 0 end 10 7 15 9 14 2 4 61 Spring 201 2015 Slide 7
CT @ VT Filter pattern Motivation: in big data only certain occurrences may be of interest Big earthquakes Temperatures above or below a certain threshold A high or low crime rate Mechanism: combine iteration – to provide each element one at a time decision - process each element that passes the test Spring 201 2015 Slide 8
CT @ VT Filter pattern Basic step A true Test A Process A false Spring 201 2015 Slide 9
CT @ VT Next steps today Work on the assigned Blockly and list problems in the book using iteration and decision Work as an individual Seek help from and provide help to your cohort Go as far and as fast as you can remembering to keep everyone in your cohort on board Cohort feedback/reports Start looking at data streams (7.4-7.6 in the book) Spring 201 2015 Slide 10
Recommend
More recommend