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
144   ◾     Computational Thinking for the Modern Problem Solver
CONDITION produces a value of true, then the IF-TRUE-ACTIONS are
executed, otherwise the IF-FALSE-ACTIONS are executed.
Using this notation, we can now write a program that more e-
ciently expresses the shipping cost policy for our online shopping site.
Figure5.12 shows how the owchart of Figure5.10 can be expressed as a
computable algorithm.
Aer the orderAmount is obtained in line 1, the program will select
either the action on line 3 or the action on line 5 depending upon the
condition. In this example, the condition is given as “orderAmount < 40”.
When this condition is tr ...
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