## The Python Workbook: A Brief Introduction with Exercises and SolutionsWhile other textbooks devote their pages to explaining introductory programming concepts, Designed to support and encourage hands-on learning about programming, this student-friendly work contains 174 exercises, spanning a variety of academic disciplines and everyday situations. Solutions to selected exercises are also provided, supported by brief annotations that explain the technique used to solve the problem, or highlight specific points of Python syntax. No background knowledge is required to solve the exercises, beyond the material covered in a typical introductory Python programming course. Features: uses an accessible writing style and easy-to-follow structure; includes a mixture of classic exercises from the fields of computer science and mathematics, along with exercises that connect to other academic disciplines; presents the solutions to approximately half of the exercises; provides annotations alongside the solutions, which explain the approach taken to solve the problem and relevant aspects of Python syntax; offers a variety of exercises of different lengths and difficulties; contains exercises that help the development of programming skills using if statements, loops, basic functions, lists, dictionaries, files, and recursive functions. Undergraduate students undergoing their first programming course and wishing to enhance their programming abilities will find the exercises and solutions provided in this book to be ideal for their needs. |

### What people are saying - Write a review

Python is a very popular and very powerful modern programing language. In terms of its syntax and style it might be one of the “cleanest” programming languages out there. Yet, its deceptively simple code often belies the underlining power and efficiency. In terms of professional development, knowledge of Python is right now probably one of the most sought out technical skills. Learning Python is very learning for many technical professions, and this small books is a very useful resource to have for exactly such purpose.

The best way to learn any new skill is to do a lot of exercises and solve a lot of problems. This workbook provides 174 relatively straightforward excises that cover most important programming topics. The exercises are dived into eight different sections, such as “Loop Exercises,” “Dictionary Exercises,” “Recursion Exercises,” etc. The statement of the exercises/problems is very clear and well explained, and it’s usually covered in one or two paragraphs. The exercises also state if they are solved or not, and how long in terms of lines of program the solutions are.

As is to be expected from an workbook of this kind, many of the exercises come with a solution that is provided at the back of the book. The solutions are very to the point and concise, with a minimal amount of comments and explanations. Comments are given in the form of commented-out lines of code, while the short explanations are given on the side in grey boxed areas. All the code is properly and cleanly formatted. It is also color coded, which is a nice bonus and greatly helps with readability.

The content and the difficulty level of this book are both very accessible. The book is suitable for a gentle introductory college level course, or even a solid high school intro to programming course. None of the exercises require more than a few dozen lines of code to implement, and thus are not too demanding on your time and effort. A book like this one might in fact be ideal for someone aiming to learn programming or Python on his own. It can also be a very good supplementary material for an online course, which is in fact how I have been mostly using it. After a few weeks of going through these exercises I find that my Python fluency has greatly increased, and I am able to think in Pythonese and code much more efficiently. The book is a great resource for acquiring the basic coding fluency, but for more advanced programming skills you will need a more substantial reference.

### Contents

3 | |

2 If Statement Exercises | 14 |

3 Loop Exercises | 29 |

4 Function Exercises | 39 |

5 List Exercises | 48 |

6 Dictionary Exercises | 61 |

7 File and Exception Exercises | 69 |

8 Recursion Exercises | 79 |

10 If Statement Solutions | 97 |

11 Loop Solutions | 107 |

12 Function Solutions | 114 |

13 List Solutions | 127 |

14 Dictionary Solutions | 139 |

15 File and Exception Solutions | 145 |

16 Recursion Solutions | 156 |

162 | |

### Other editions - View all

The Python Workbook: A Brief Introduction with Exercises and Solutions Ben Stephenson Limited preview - 2019 |

The Python Workbook: A Brief Introduction with Exercises and Solutions Ben Stephenson No preview available - 2015 |

The Python Workbook: A Brief Introduction with Exercises and Solutions Ben Stephenson No preview available - 2019 |