Problem Solving in C and Python: Programming Exercises and Solutions, Part 1 Problem Solving in C and Python: Programming Exercises and Solutions Part 1
Authors: Yana Kortsarts, Yulia Kempner, Leonid Kugel, Adam Fischbach (Editor)
Cover Designers: Zuny Jamatte & Michal Kortsarts
This book is a collection of exercises for the introductory programming course. We are focusing on two programming languages: Python and C. Each chapter provides a short overview of the necessary theoretical material for both programming languages, sample solutions written in C and Python 3 (version 3.5.1, the most recent version of Python at the time the book was written), and a list of practice exercises in increasing order of difficulty. This book covers basic programming concepts such as input/output, decision structures and repetition structures (loops).
The main purpose of the textbook is to promote effective development of the problem solving skills through an extended guided analysis phase of the software design cycle. Special consideration is devoted to word problems, the most challenging type of exercises, requiring translation of the “story” into programming language. Sample solutions in Python and C include detailed analysis and explanation of all steps in the problem solving process. All solutions follow the proposed problem solving approach which starts from extensive analysis of the input and output data, including their limitations, and then step by step transition from solution to final result.
This book is based on the extensive experience of the authors teaching introductory programming courses in Python and C.
How to Use this Book
For instructors, the books provides am extensive list of programming exercises that could be incorporated into laboratory or/and practice sessions accompanying introductory programming in Python or/and C courses.
For students, the book provides an extensive list of solved problems to learn from and practice problems.
If you are a student taking an introductory programming course in Python or/and C this book will serve as a great complimentary material to the lecture/theory material covered in class.
If you are an instructor teaching an introductory programming course in Python or/and C this book will serve as a great source for practice exercises, quizzes, and exams.
Chapter 1 covers input and output
Chapter 2 covers decision structures including switch programming structure in C
Chapter 3 covers repetition structures – loops, including nested loops.
Disclaimer: most of the problems are not original problems; in some cases the appropriate references are provided, but in many cases the problems are drawn from mathematical and programming folklore.