# Preface

This book is designed to introduce you to the basics of programming with Python, one of the most popular and versatile programming languages in the world. Python is widely used for data analysis, web development, automation, and many other applications. Whether you are a student, a hobbyist, or a professional, learning Python can open up many opportunities for you.

The book assumes that you have no prior experience in programming, and covers the fundamental concepts and skills that you need to get started. You will learn how to write simple programs, use variables, data types, operators, functions, loops, conditionals, and modules. You will also learn how to work with files, exceptions, classes, and objects. Along the way, you will encounter many examples and exercises that will help you practice and reinforce what you learn.

The book is intended for first year students in higher education in the UK who are novice programmers. However, anyone who wants to learn Python can benefit from this book. The book also aligns with the Python Software Foundation's official style guide for Python code, known as PEP 8 and the Google style guidance for code documentation.

In addition, the goal of this book is to teach you to think like a computer scientist. This way of thinking combines some of the best features of mathematics, engineering, and natural science. Like mathematicians, computer scientists use formal languages to denote ideas (specifically computations). Like engineers, they design things, assembling components into systems and evaluating trade-offs among alternatives. Like scientists, they observe the behaviour of complex systems, form hypotheses, and test predictions.

The single most important skill for a computer scientist is **problem solving**. Problem solving means the ability to formulate problems, think creatively about solutions, and express a solution clearly and accurately. As it turns out, the process of learning to program is an excellent opportunity to practice problem-solving skills.

By the end of this book, you will have a solid foundation in Python programming, and be ready to explore more advanced topics and applications. You will start to think like a computer scientist, evaluating trade-offs among alternative implementations, developing your critical thinking along the way.

I hope you enjoy reading this book as much as I enjoyed writing it.
