Blockly Lists & Iteration CT @ VT Things we are seeing Using - - PowerPoint PPT Presentation

blockly lists iteration
SMART_READER_LITE
LIVE PREVIEW

Blockly Lists & Iteration CT @ VT Things we are seeing Using - - PowerPoint PPT Presentation

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)


slide-1
SLIDE 1

Introduction to Computational Thinking

Blockly Lists & Iteration

slide-2
SLIDE 2

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

Slide 2 Spring 201 2015

slide-3
SLIDE 3

CT@VT Patterns

 Uniform: perform the same processing

  • n 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

Slide 3 Spring 201 2015

slide-4
SLIDE 4

CT@VT Thinking about iteration

Slide 4 Spring 201 2015

middle start end

slide-5
SLIDE 5

CT@VT Accumulate pattern

Slide 5 Spring 201 2015

property property middle

slide-6
SLIDE 6

CT@VT Finding the total

Slide 6 Spring 201 2015

32 34 middle 4 14 9 2 15 7 10 10 7 15 2 9 14 4

slide-7
SLIDE 7

CT@VT Finding the total

Slide 7 Spring 201 2015

beginning 4 14 9 2 15 7 10 61 end 4 14 9 2 15 7 10

slide-8
SLIDE 8

CT@VT Filter pattern  Motivation: in big data only certain

  • ccurrences 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

Slide 8 Spring 201 2015

slide-9
SLIDE 9

CT@VT Filter pattern

Slide 9 Spring 201 2015

false Basic step Test A true Process A A

slide-10
SLIDE 10

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)

Slide 10 Spring 201 2015