Enjoy fast, free delivery, exclusive deals, and award-winning movies & TV shows.
Buy New
-48% $20.95
FREE delivery Sunday, May 10 on orders shipped by Amazon over $35
Ships from: Amazon.com
Sold by: Amazon.com
$20.95 with 48 percent savings
List Price: $39.99
Get Fast, Free Shipping with Amazon Prime
FREE delivery Sunday, May 10 on orders shipped by Amazon over $35
Or Prime members get FREE delivery Tomorrow, May 6. Order within 4 mins. Join Prime
In Stock
$$20.95 () Includes selected options. Includes initial monthly payment and selected options. Details
Price
Subtotal
$$20.95
Subtotal
Initial payment breakdown
Shipping cost, delivery date, and order total (including tax) shown at checkout.
Shipper / Seller
Amazon.com
Amazon.com
Shipper / Seller
Amazon.com
Returns
FREE 30-day refund/replacement
FREE 30-day refund/replacement
Quick refund
Usually issued within 24 hours. See exceptions
FREE return
At least one free return option available.
Convenient dropoff
At any of our 50,000 US locations.
See return policy
Gift options
Available at checkout
Available at checkout This item is a gift. Change
At checkout, you can add a custom message, a gift receipt for easy returns and have the item gift-wrapped
Payment
Secure transaction
Your transaction is secure
We work hard to protect your security and privacy. Our payment security system encrypts your information during transmission. We don’t share your credit card details with third-party sellers, and we don’t sell your information to others. Learn more
$10.86
May have limited writing in cover pages. Pages are unmarked. ~ ThriftBooks: Read More, Spend Less May have limited writing in cover pages. Pages are unmarked. ~ ThriftBooks: Read More, Spend Less See less
In stock
$$20.95 () Includes selected options. Includes initial monthly payment and selected options. Details
Price
Subtotal
$$20.95
Subtotal
Initial payment breakdown
Shipping cost, delivery date, and order total (including tax) shown at checkout.
Access codes and supplements are not guaranteed with used items.
Ships from and sold by ThriftBooks-Seattle.
Added to

Sorry, there was a problem.

There was an error retrieving your Wish Lists. Please try again.

Sorry, there was a problem.

List unavailable.
Kindle app logo image

Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required.

Read instantly on your browser with Kindle for Web.

Using your mobile phone camera - scan the code below and download the Kindle app.

QR code to download the Kindle App

  • Invent Your Own Computer Games with Python, 4th Edition

Follow the author

Get new release updates & improved recommendations
Something went wrong. Please try your request again later.

Invent Your Own Computer Games with Python, 4th Edition Paperback – Illustrated, December 16, 2016


{"desktop_buybox_group_1":[{"displayPrice":"$20.95","priceAmount":20.95,"currencySymbol":"$","integerValue":"20","decimalSeparator":".","fractionalValue":"95","symbolPosition":"left","hasSpace":false,"showFractionalPartIfEmpty":true,"offerListingId":"xu%2BI0ktV8FQTd%2FpJIzubj8lQxztmE9E09dChCeL3%2Bp2hmItDKmA1cnD8VBXUciyqyMpk2yR2NjFKDwSbGW%2B7vH0OX7pMw%2Ftugn96W7Wr5B1r78w0rcyjfJZE3gtrp4wBvdZxXQEPPj8HMig9%2BuskZg%3D%3D","locale":"en-US","buyingOptionType":"NEW","aapiBuyingOptionIndex":0}, {"displayPrice":"$10.86","priceAmount":10.86,"currencySymbol":"$","integerValue":"10","decimalSeparator":".","fractionalValue":"86","symbolPosition":"left","hasSpace":false,"showFractionalPartIfEmpty":true,"offerListingId":"xu%2BI0ktV8FQTd%2FpJIzubj8lQxztmE9E0HmEyZh6gcbiQW60OVNvOZCsFVmAwlezecCTNnU%2FaOCdHrMlUYoo19px3%2FYsi5wn9%2B3Zzy8BuND9yPNC51gV%2FnRsja6s8hHh5vuY5WwnTLDqpbKi0vaivtBO%2BD3QDQYUUoJ0NlSpC690qQpG91KGg1g%3D%3D","locale":"en-US","buyingOptionType":"USED","aapiBuyingOptionIndex":1}]}

Purchase options and add-ons

Invent Your Own Computer Games with Python will teach you how to make computer games using the popular Python programming language—even if you’ve never programmed before!

Begin by building classic games like Hangman, Guess the Number, and Tic-Tac-Toe, and then work your way up to more advanced games, like a text-based treasure hunting game and an animated collision-dodging game with sound effects. Along the way, you’ll learn key programming and math concepts that will help you take your game programming to the next level.

Learn how to:
–Combine loops, variables, and flow control statements into real working programs
–Choose the right data structures for the job, such as lists, dictionaries, and tuples
–Add graphics and animation to your games with the pygame module
–Handle keyboard and mouse input
–Program simple artificial intelligence so you can play against the computer
–Use cryptography to convert text messages into secret code
–Debug your programs and find common errors

As you work through each game, you’ll build a solid foundation in Python and an understanding of computer science fundamentals.

What new game will you create with the power of Python?

The projects in this book are compatible with Python 3.

Frequently bought together

This item: Invent Your Own Computer Games with Python, 4th Edition
$20.95
Get it as soon as Sunday, May 10
In Stock
Ships from and sold by Amazon.com.
+
$27.53
Get it as soon as Sunday, May 10
In Stock
Ships from and sold by Amazon.com.
+
$10.61
Get it as soon as Sunday, May 10
In Stock
Ships from and sold by Amazon.com.
Total price: $00
To see our price, add these items to your cart.
Details
Added to Cart
Choose items to buy together.

Customers also bought or read

Loading...

From the Publisher

Invent Your Own Computer Games with Python, 4E on black background with No Starch Press logo
Review of Invent Your Own Computer Games with Python, 4E on black background
Review of Invent Your Own Computer Games with Python, 4E on black background
A man wearing a driving cap and red plaid shirt. He is seated in a cafe.

About the Author

Al Sweigart is a software developer and teaches programming to kids and adults. He has written several Python books, including Automate the Boring Stuff with Python and Making Games with Python & Pygame.

No Starch Press logo. A black circle with a white iron and a star in the center.

About the Publisher

No Starch Press has published the finest in geek entertainment since 1994, creating both timely and timeless titles like Python Crash Course, Python for Kids, How Linux Works, and Hacking: The Art of Exploitation. An independent, San Francisco-based publishing company, No Starch Press focuses on a curated list of well-crafted books that make a difference. They publish on many topics, including computer programming, cybersecurity, operating systems, and LEGO. The titles have personality, the authors are passionate experts, and all the content goes through extensive editorial and technical reviews. Long known for its fun, fearless approach to technology, No Starch Press has earned wide support from STEM enthusiasts worldwide.

Editorial Reviews

Review

“Pretty close to the ultimate how-to-learn python book. First, it combines an easy ramp up from expecting you to know virtually nothing to having you try out – and understand – Python. Second, it provides the code, the tools, and the explanations required for you build a number of increasingly sophisticated games and the know-how to branch out to creating games completely on your own.”
—Computerworld

“Many of the games include flowcharts so the reader will better understand the logic needed to complete the game, and I was especially happy to see a few chapters focus on topics not necessary limited to games such as Cartesian coordinates and using the built-in Debugger.”
—GeekDad

“This is an excellent way to learn Python, if you are a kid or not. Little kids can learn with their adult guide, and older kids will eat this book up in an afternoon or two.”
—Greg Laden, National Geographic's ScienceBlogs

“This book is a great entry point for beginning programmers that 'gamifies' coding, allowing readers to immediately apply the concepts covered, rather than teaching basics with little application.”
—School Library Connection

"If games are your thing, this would be the perfect book to learn Python."
—Rajat, @argent_codes

About the Author

Al Sweigart is a software developer and teaches programming to kids and adults. He has written several Python books, including Automate the Boring Stuff with Python and Making Games with Python & Pygame.

Product details

About the author

Follow authors to get new release updates, plus improved recommendations.
Al Sweigart
Brief content visible, double tap to read full content.
Full content visible, double tap to read brief content.

Al Sweigart is a software developer and tech book author living in Houston. He has written several programming books for beginners, including Automate the Boring Stuff with Python. His books are freely available under a Creative Commons license at his website https://inventwithpython.com.

Customer reviews

4.7 out of 5 stars
555 global ratings

Customers say

Customers find this programming book excellent for beginners, as it teaches Python while creating games. Moreover, the content is well-written and engaging, with customers appreciating the many ways to modify the included games.
AI Generated from the text of customer reviews

Select to learn more

32 customers mention content, 29 positive, 3 negative
Customers find the book excellent for beginners, particularly for learning Python and creating games, with one customer noting its effectiveness in teaching debugging skills.
Its a good book but with a warning. You learn a lot about logic and how to design your code/app....Read more
This is a great book, especially for beginners. You learn the basics while creating games!...Read more
Learing a great deal about python. Good starter book. Making use of it with some high school students interested in programming.Read more
Interest is the best teacher. That is why I choose this book to teach my sons Python. The book is well written....Read more
13 customers mention engaging, 12 positive, 1 negative
Customers find the book engaging and fun to follow, with many ways to modify the games, and one customer notes it's a great way to learn Python programming.
...The writing in this book is tight, engaging, entertaining, and just seriously impressive, and the projects are super fun too....Read more
Super fun and interactive!Read more
Well chosen material, starting basic and ramping up nicely. Great games. The approach of having students type in the programs is a good idea!...Read more
...to do while learning Python, this book gives you something to do, kind of fun.Read more
6 customers mention writing quality, 5 positive, 1 negative
Customers find the book well written, with one customer noting it is essential for writing any kind of software.
Well written book that lets you apply the concepts quickly. It’s.Read more
...That is why I choose this book to teach my sons Python. The book is well written....Read more
...It's well written and engaging! Strongly recommended to any computer science teachers or anyone who wants to learn coding....Read more
...in so many fundamental programming topics that are essential for writing any kind of software, not just games....Read more

Top reviews from the United States

  • Reviewed in the United States on April 11, 2026
    Format: PaperbackVerified Purchase
    Interest is the best teacher. That is why I choose this book to teach my sons Python.
    The book is well written. My teenage son followed it to learn Python and build a few games in Python.
    I will guide my son to continue to learn Python with the book as a reference.
    I highly recommend it for kids and interested adults to learn programming in Python.
  • Reviewed in the United States on November 6, 2025
    Format: PaperbackVerified Purchase
    This book is a fun way to learn Python programming by teaching the language elements by writing games. From simple statements, using the debugger, designing programs logically with flowcharts, processing a main event loop, to incorporating player-missile graphics and sound, this books provides a good introduction to Python by building games and providing insights into how to build your own games.
    One person found this helpful
    Report
  • Reviewed in the United States on March 1, 2026
    Format: PaperbackVerified Purchase
    Good coding book
  • Reviewed in the United States on May 22, 2019
    Format: PaperbackVerified Purchase
    I'm using this book to teach programming to my 13 year old. Like many kids his age, he's really into games and that interest has led him to want to learn how to program. So, this book is a perfect lead in. Basically, you copy the code for the game and then the author explains step-by-step what the code does. While that is good, it is also incomplete. As boring as it is, I feel like he needs to write his own smaller "toy" programs in order to really get the concepts. I suppose I could (and will) make up for this by coming up with exercises to do this, but it would have been nice, if the author had included some himself. So, I like a lot about this book, however, I feel it is incomplete without such exercises, and so will give it four stars instead of five.
    26 people found this helpful
    Report
  • Reviewed in the United States on April 28, 2025
    Format: PaperbackVerified Purchase
    "Invent Your Own Computer Games with Python" is a truly fantastic book. It goes far beyond just teaching game creation; it lays a solid foundation in so many fundamental programming topics that are essential for writing any kind of software, not just games. You really learn the core concepts needed to succeed.

    However, the way it uses game development to teach these concepts is definitely the best part! It makes learning engaging and practical. After working through this book, I genuinely feel equipped to create a huge range of projects, perhaps even anything I can imagine building.

    Honestly, this was the best purchase I've made in a long time, and that's saying something because I'm not usually a huge fan of reading! If you want to learn Python and programming in a fun, hands-on way that delivers real results, I highly recommend this book. It truly empowers you to start inventing your own creations.
  • Reviewed in the United States on October 23, 2017
    Format: PaperbackVerified Purchase
    I just finished reading "Invent Your Own Computer Games with Python", and it's my new all-time favorite book for beginners who want to learn how to program. Al's outdone himself with this one. He does an incredible job of teaching the reader how to program in Python from scratch; whenever he comes to a concept that the reader may not be familiar with, he explains it clearly and thoroughly using simple English, and then demonstrates why the concept is useful.

    The writing in this book is tight, engaging, entertaining, and just seriously impressive, and the projects are super fun too. I particularly liked the Tic-Tac-Toe project: I thought it was really clever to have the reader implement an AI for one of their games so early on in the book, instead of burying something fun like that in a later chapter.

    I don't know if Al's gotten way better at writing over the past few years, or if he's gotten a great editor, or some combination of the two; but whatever the cause, this book really shines. When I read his book "Making Games with Python & Pygame" (published in 2012), I found that he sometimes explained concepts using frustratingly vague language, or introduced them in an order that bothered me, and I also noticed a few typos and bugs in that book's prose and code; I found basically zero such issues in "Invent Your Own Computer Games with Python".

    The only main thing I wish he'd change is that he uses mixedCase for his variable and function names, but snake_case is the naming standard in Python programs (documented in PEP8). It's not obvious to me why he prefers mixedCase, and this seems like something that shouldn't have survived to the fourth edition of this book. All in all, though, this is a problem I'm more than willing to overlook, given how otherwise excellent this book is.

    From now on, whenever a friend asks me what the best way is of learning to program, I'm going to point them directly to this book. Keep up the great work, Al!
    51 people found this helpful
    Report
  • Reviewed in the United States on October 26, 2025
    Format: PaperbackVerified Purchase
    I love video games im learning blender substance and so much more to better make my own assets but this book helps me with the basics with python games im usually into Unity or Unreal but I can say this has spread a new light on game development using this book
    One person found this helpful
    Report
  • Reviewed in the United States on April 24, 2022
    Format: KindleVerified Purchase
    I'm a programmer and I'm teaching Python to my 7-year-old son. I decided to start with this book. It took us over a year to get through all the chapters. My son typed in all the code for each chapter without copying and pasting. After that I read the chapter to him, explaining the code. Then he had fun playing and modifying the games! My son's review is below:

    --------------------------

    Dear Mr. Sweigart, I really enjoyed the games in your book. There are many ways of modifying the games, like in the dodger game, you can make it so that every time your score gets to 1000, the baddies fall faster by 1. Also, you can change all the images and music to be like Zelda and you can make it 2 players. In Sounds and Images, you can make another food that makes you smaller. I like the improved hangman from chapter 9 because it has different levels of difficulty. Please continue to write more books on this topic.
    24 people found this helpful
    Report

Top reviews from other countries

  • Correcaminos
    4.0 out of 5 stars Bien para empezar
    Reviewed in Spain on July 18, 2017
    Format: PaperbackVerified Purchase
    Quizás hecho en falta más programas con entorno gráfico.Al final trata sobre pygame. Por lo demás muestra los programas de forma didáctica y amena
  • Chandra
    5.0 out of 5 stars Worthy buy
    Reviewed in India on August 12, 2024
    Format: PaperbackVerified Purchase
    Bought this for my son who is in high school. Good to see him stuck to this book and coding on his own. Python is crucial in today’s context and hopefully his love for code grows further. Partly thanks to this book which teaches via a game-like narration.
  • Stargazer
    5.0 out of 5 stars Extremely useful and much much better than all the others I ...
    Reviewed in the United Kingdom on May 25, 2017
    Format: PaperbackVerified Purchase
    Extremely useful and much much better than all the others I have tried. It is carefully arranged so that progression and additions to any initial code can be clearly followed - simply by numbering lines of code and using bold print. This makes it SO much better other books that claim to be for beginners. One drawback that it does share with its competitors is the absence of a distinct and obviously different font for code words and lines of code. As printed, the difference is too slight unless concentration is high. However I still rate it very highly.
  • Anonymous
    5.0 out of 5 stars Arrived safe and sound!
    Reviewed in Canada on September 7, 2024
    Format: PaperbackVerified Purchase
    Got here on time and in good condition. Looking forward to reading it.
  • Gabriel
    5.0 out of 5 stars Exceptional Quality
    Reviewed in Japan on February 12, 2024
    Format: PaperbackVerified Purchase
    I had an excellent experience with Rarewaves-USA; they shipped my order promptly and everything arrived in perfect condition.

    The book "Invent Your Own Computer Games with Python" is fantastic. The quality of the book exceeded my expectations and I am thrilled with my purchase. It really doesn't get any better than this!

    Highly recommend both the seller and the book to anyone interested in programming or game development. Truly a great find!
    Customer image
    Gabriel
    5.0 out of 5 stars
    Exceptional Quality

    Reviewed in Japan on February 12, 2024
    I had an excellent experience with Rarewaves-USA; they shipped my order promptly and everything arrived in perfect condition.

    The book "Invent Your Own Computer Games with Python" is fantastic. The quality of the book exceeded my expectations and I am thrilled with my purchase. It really doesn't get any better than this!

    Highly recommend both the seller and the book to anyone interested in programming or game development. Truly a great find!
    Images in this review
    Customer image Customer image