Jump to ratings and reviews
Rate this book

Learn AI-assisted Python Programming: With GitHub Copilot and ChatGPT

Rate this book
Writing computer programs in Python just got a lot easier! Use AI-assisted coding tools like GitHub Copilot and ChatGPT to turn your ideas into applications faster than ever.

AI has changed the way we write computer programs. With tools like Copilot and ChatGPT, you can describe what you want in plain English, and watch your AI assistant generate the code right before your eyes. It’s perfect for beginners, or anyone who’s struggled with the steep learning curve of traditional programming.

In Learn AI-Assisted Python With GitHub Copilot and ChatGPT you’ll learn how


Learn AI-Assisted Python With GitHub Copilot and ChatGPT is a hands-on beginner’s guide that is written by two esteemed computer science university professors. It teaches you everything you need to start programming Python in an AI-first world. You’ll hit the ground running, writing prompts that tell your AI-assistant exactly what you want your programs to do. Along the way, you’ll pick up the essentials of Python programming and practice the higher-level thinking you’ll need to create working apps for data analysis, automating tedious tasks, and even video games.

Foreword by Beth Simon, Ph.D.

Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.

About the technology

The way people write computer programs has changed forever. Using GitHub Copilot, you describe in plain English what you want your program to do, and the AI generates it instantly.

About the book

This book shows you how to create and improve Python programs using AI—even if you’ve never written a line of computer code before. Spend less time on the slow, low-level programming details and instead learn how an AI assistant can bring your ideas to life immediately. As you go, you’ll even learn enough of the Python language to understand and improve what your AI assistant creates.

What's inside



About the Author

If you can move files around on your computer and install new programs, you can learn to write useful software!

About the author

Dr. Leo Porter is a Teaching Professor at UC San Diego. Dr. Daniel Zingaro is an Associate Teaching Professor at the University of Toronto. The technical editor on this book was Peter Morgan.

Table of Contents

1 Introducing AI-assisted programming with Copilot
2 Getting started with Copilot
3 Designing functions
4 Reading Python code – Part 1
5 Reading Python Code – Part 2
6 Testing and prompt engineering
7 Problem decomposition
8 Debugging and better understanding your code
9 Automating tedious tasks
10 Making some games
11 Future directions

296 pages, Paperback

Published November 21, 2023

12 people are currently reading
35 people want to read

About the author

Leo Porter

3 books

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
10 (43%)
4 stars
7 (30%)
3 stars
5 (21%)
2 stars
0 (0%)
1 star
1 (4%)
Displaying 1 - 10 of 10 reviews
Profile Image for Mark Dechamps.
3 reviews1 follower
February 2, 2024
I totally agree with the review already posted here.
This is a very well written book (it reads like a train.) on how to use AI to help you (assist you, as it says on the tin) in programming Python. Target audience is beginner to a bit more experienced.

3 reviews1 follower
February 3, 2024
In my life software development has gone through many major changes, starting with C and cgi-bin, using a text editor, then we moved to IDEs and those have become more sophisticated, even helping us to see where we made mistakes and what we can do to make our code better.

Now we have the next major advancement, where we can not only get suggestions on writing a function as you start typing, to writing a prompt and having it create more code, but don't expect to just give a prompt and have an entire application written out.

This book helps us understand what is reasonable expectations and how to approach using a tool like copilot to help developers to get more, high quality, code written faster.

I was against the idea of using these tools when I started the book but by the end of chapter 2 I realized that I was the old man sitting on a patio yelling at the neighbors, and it was time to accept that this revolution will march on whether I want to change or not, so I might as well learn how to use it more fully.

One big change is for more junior developers to start to think about how to better decompose functions into smaller parts, so it is easier to write a simple prompt and get code, and honestly, each function should only do one task.

They walk through how to do prompt engineering and decompose and then writing unit tests, and though they focus on python, they explain everything well enough that it is easy for non-python programmers to understand the concept and apply it to the tool they choose to use in their own IDE.

They helped open my eyes.
6 reviews
December 10, 2023
Once in a while a Technology makes its appearance that has the potential to literally change our way forward. There is no denying that ChatGPT and Github CoPilot has such potential and we can already see it making waves. In such times as now, a shift is happening where AI assistants such as ChatGPT can write good enough code for you, provided you know what to ask exactly and verify what it generates for you. This book teaches you these exact skills. It will teach you the skills to master the basics of Python, because, it is very important to interpret the programs that CoPilot or ChatGPT generates and ensure that they match with what you need, and most important the book teaches you the skill to ask the AI what exactly you need and if required, break down the tasks into smaller subtasks and then check on the same. If you are new to programming, welcome aboard and pick up this book and it shall not disappoint you. If you are already a seasoned programmer, this book will still teach you how to make the best of AI assistants by taking Github CoPilot as an example. It will also walk you though various best practices of programming like what makes a program good, how to test effectively etc. A great book at the right time!
1 review
Read
February 2, 2024
In this book we learn two things. On the one hand, the syntax of the Python language. And on the other hand, to question an artificial intelligence (GitHub Copilot) to obtain parts of a program. This allows the first program to be written not to be the typical 'Hello world', but rather a program that reads a file in csv format and performs statistical calculations.
People who already know how to program in other languages and want to learn Python can benefit from this book, as well as those who don't know how to program and want to start with this fantastic language.
The authors show how by questioning Copilot you can generate code very quickly, and also evaluate whether that code is valid and/or useful for the question we have asked, since sometimes it will return code that has nothing to do with the question done.
The book also has a chapter dedicated to testing, which today is essential for developing software in serious projects.
Lastly, Github Copilot has a 30-day free trial, and then it's $10/month (at the time of writing this review).
5 reviews
October 17, 2024
"Learn AI-Assisted Python Programming: With GitHub Copilot and ChatGPT" by Leo Porter and Daniel Zingaro is one of the best programming books I've read. It can serve as a model for beginner-level programming guides in the age of AI code assistants.

The authors, being experienced educators, highlight the essential skills needed for successful programming in today’s AI-driven world. I particularly liked their emphasis on:
* Breaking down problems
* Reading code
* Testing and debugging
* Creating effective prompts

The book focuses on these skills and expertly combines explanations of GitHub Copilot and Python. It starts with an introduction to AI assistants, helps you set up the Python environment, and covers the basics of Python. The well-organized chapters build and sharpen intuition about how Python works, complemented by practical code examples to reinforce learning.
2 reviews
February 5, 2024
Very good introduction to AI assisted programming

The book will guide you through how to get started with both the Python programming language and GitHub Copilot. You will be learn normal good programming practices and why they are still important even if you use Copilot to write most of the code. You can easily apply the examples to other coding languages.
The authors also make sure to explain the shortcomings of generative AI, so you know where to step in and verify and correct the generated code. The book is aimed at new programmmers and is a such quite basic programming wise, but even if you already know programming, it is still worthwhile as an easy read on how to benefit from generative AI in your everyday programming tasks.
2 reviews
December 14, 2023
The world of software development is undergoing significant changes with the introduction of AI assistants. A novice looking to learn Python programming must necessarily take into account these powerful tools and understand their limits and potential.

In this book, the two authors, through very effective examples and in-depth coverage of the language and concepts necessary for those entering the programming world, brilliantly provide an excellent approach to learning both programming and AI. It is a very useful book for those approaching programming from scratch and also for those who want a better understanding of how AI assistants work and what their real potential is.
Profile Image for Mikhail Filatov.
377 reviews18 followers
October 14, 2025
The authors are professors and are teaching programming courses. So the book is pretty solid and structured.
But it seems to be a reimagined with Copilot version of structured programming course. They are going through a task doing a top-level design of functions and use Copilot on a function level only. I don’t think any “vibe coder” would have enough patience to do it this way.
Profile Image for Jin Shusong.
79 reviews1 follower
April 2, 2024
The illustrations presented within the text are intentionally simplistic, yet they effectively facilitate the acquisition of fundamental competencies. Moreover, the methodologies of top-down analysis and divide-and-conquer are expounded as ubiquitous principles.
Profile Image for Steven Allen.
1,187 reviews22 followers
November 23, 2024
I am currently studying data science. In my course work I have had to do some Python programming. I thought that perhaps this book might help. While interesting and full of good tips, this book is not one that will help with my course work.
Displaying 1 - 10 of 10 reviews

Can't find what you're looking for?

Get help and learn more about the design.