Skip to Main Content
Computational Thinking for the Modern Problem Solver
book

Computational Thinking for the Modern Problem Solver

by David Riley, Kenny A. Hunt
March 2014
Beginner to intermediate content levelBeginner to intermediate
405 pages
12h 16m
English
Chapman and Hall/CRC
Content preview from Computational Thinking for the Modern Problem Solver
Solving Problems   ◾     103  
temp ← myDog
myDog ← yourDog
yourDog ← temp
Lest you think that patterns are unimportant. ink what would happen if
programmers did not know about the swap pattern and incorrectly assumed
that the following algorithm would work to swap myDog and yourDog:
myDog←yourDog
yourDog ← myDog
Swapping illustrates one kind of algorithmic pattern. Another, more
general, pattern of soware execution is known as repetition. Repetition is
used anytime a task needs to be repeatedly performed. Repetition is com-
mon in computer programs because one of the things that the computer
can do well is to repeat some process, no matter how mundane, over and
over. Soware developers might recognize a pattern of repeating some-
thing ve ti
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

From Computing to Computational Thinking

From Computing to Computational Thinking

Paul S. Wang

Publisher Resources

ISBN: 9781466587793