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
Algorithmic Thinking   ◾     241  
8.3.2.5 Substring
Although indexing allows us to obtain an individual character of a string,
we oen want to obtain a subsequence of a string. e substring function
allows us to obtain part of a string if we know the indices of the rst and
last characters that we want to extract from the string. An example of
the substring function is shown in Figure8.26. e function substring
is applied to the x variable, which is bound to the string “computational
thinking”. We are telling the computer to give us the sequence of charac-
ters starting from the character at index 3 and ending with the character
at index 5. ...
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