Problem Solving with Flowcharts and a Little Flavor of Programming with Python

By Achla Agarwal, Krishna Agarwal, Laura Goadrich, and Mark Goadrich

ISBN 978-0-557-27634-9
© 2008-2010

Now available from Lulu.com!


Overview | Chapters | Slides | Quizzes


Overview

This book was written for students of any age who want to learn the concepts to enable them to program successfully. Programming is an art and this text will teach you the techniques and underlying logic that will form the foundation of future coding skills no matter what language you choose to program in. Because there are a variety of programming languages that are changing and evolving, it is important to create a solid skill-set that is adaptable to any programming language you choose to learn.

Today, computers are used in almost every aspect of our daily lives. From the alarm clock that wakes you in the morning, to the car or bus that takes you to and from school, computers are vital to maintain our current lifestyles. A computer at its core is just metal and silicon. It is the way that the metal and silicon is organized, in a logical manner that makes computers useful. One way to incorporate logic into a computer is through instructions in a program. A program is made up of instructions that execute a specific task in a language that a computer can understand.

Since programming is a multifaceted area, we use examples from a variety of areas to reach the interests of a large number of students. We focus our examples and problems on situations that arise every day. From painting a room to organizing employee information to examining DNA, we have included examples in many areas of Science, Technology, Engineering and Mathematics (STEM) to show the interconnectedness of computers.

The goal of creating a program is to solve a task. This task must be broken down into clear steps to reach your end goal. We focus on using flowcharts to allow the learner to visualize and group the steps in the programming process. Flowcharts are also helpful in organizing thoughts to create a clear task order.

In addition to flowcharts, we also focus on pseudocode and code tracing. While flowcharts are a wonderful visual tool, more complicated problems can be written in a more compact form using pseudocode. To clearly understand both the execution of the flowchart and pseudocode, it is important to be able to trace the code as well. We give detailed techniques for code tracing that will solidify the execution performed in the computer memory.

Each chapter has been organized to begin with an outline of topics needed from previous chapter sections for reference. Next we illustrate the reason for the chapter with a motivating example and then work through lessons dedicated to new concepts. Each lesson is filled with a variety of examples and ends with self-check exercises for the student to check their progress and understanding at each stage. After a summary of the main concepts at the end of the chapter, there are problem sets for more practice and application of the lesson topics.

Finally we incorporated Python, a free, straight-forward programming language, for students to test their programs on the computer. In our years of teaching, students always desired a more hands-on approach to learning programming logic and Python is a wonderful tool for applying what has been learned without requiring a programming background. Also Python can be installed in a few steps on any platform (see Appendix A for more information).

The text is outlined to cover techniques for solving problems in Chapter 1 and discusses ways to store and manipulate data in Chapter 2. The next chapter introduces flowcharts and pseudocode along with standard function references and applies these techniques to a programming language called Python. Chapter 4 augments the prior chapter using print and get statements to interact with a user, incorporating code tracing and debugging while Chapter 5 introduces operators and Boolean data types. The next chapter introduces decision and selection structures following with a detailed discussion about nested selection statements and case statements. Chapter 8 and 9 focus on looping structure and nested loops while the next two chapters look at functions and arrays. The last chapter covers file input and output.

Note that the three features, flowcharts, pseudocode, Python, can be pulled apart and used independently to meet the needs for all student and logic environments. Each chapter focuses on solving everyday problems. These problems include solutions in Python for the student and instructor to experiment with and demonstrate the chapter concepts. We feel that the combination of the three features gives a balanced understanding of programming logic and a good foundation for programming.

Chapters

Slides

Quizzes


© Mark Goadrich, Centenary College of Louisiana