1<!DOCTYPE html> 2<html lang="en"> 3 <head> 4 <meta charset="utf-8" /> 5 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 6 <meta name="viewport" content="width=device-width, initial-scale=1" /> 7 <meta name="description" content="A Page in : Learn to program. For free." /> 8 <meta name="author" content="Al Sweigart" /> 9 <meta name="generator" content="Pelican (VoidyBootstrap theme)" /> 10 <meta property="og:type" content="article"/> 11 <meta property="og:title" content="Learn to program. For free."/> 12 <meta property="og:url" content="/index.html"/> 13 <meta property="og:image" 14 content="/images/images/al-sweigart.webp"/> 15 16 <title>Learn to program. For free. - Invent with Python</title> 17 18 19 <link href="/theme/css/bootstrap.min.css" 20 rel="stylesheet"> 21 22 23 <link rel="stylesheet" href="/theme/css/pygment.css" /> 24 <link rel="stylesheet" href="/theme/css/voidybootstrap.css" /> 25 26 <!--[if lt IE 9]> 27
27<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js" integrity="sha384-FFgGfda92tXC8nCNOxrCQ3R8x1TNkMFqDZVQdDaaJiiVbjkPBXIJBx0o7ETjy8Bh" crossorigin="anonymous"></script>
27 28
28<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js" integrity="sha384-ZoaMbDF+4LeFxg6WdScQ9nnR1QC2MIRxA1O9KWEXQwns1G8UNyIEZIQidzb0T1fo" crossorigin="anonymous"></script>
28 29 <![endif]--> 30 31 <link rel="shortcut icon" href="/favicon.ico" /> 32 </head> 33 34 <body> 35 36<nav class="navbar navbar-expand-lg"> 37 <div class="container-fluid"> 38 <a class="navbar-brand" href="/">INVENT WITH PYTHON</a> 39 40 <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> 41 <span class="navbar-toggler-icon"></span> 42 </button> 43 44 <div class="collapse navbar-collapse" id="navbarSupportedContent"> 45 <ul class="navbar-nav me-auto mb-2 mb-lg-0"> 46 47 <li class="nav-item dropdown"> 48 <a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">Read for Free</a> 49 <ul class="dropdown-menu"> 50 <li><a class="dropdown-item" href="https://automatetheboringstuff.com/">Automate the Boring Stuff with Python</a></li> 51 <li><a class="dropdown-item" href="/automate3workbook/">Automate the Boring Stuff - Workbook</a></li> 52 <li><a class="dropdown-item" href="/recursion">The Recursive Book of Recursion</a></li> 53 <li><a class="dropdown-item" href="/pythongently">Python Programming Exercises, Gently Explained</a></li> 54 <li><a class="dropdown-item" href="/bigbookpython">The Big Book of Small Python Projects</a></li> 55 <li><a class="dropdown-item" href="/beyond">Beyond the Basic Stuff with Python</a></li> 56 <li><a class="dropdown-item" href="https://turtleappstore.com">Coding with Minecraft</a></li> 57 <li><a class="dropdown-item" href="/invent4thed">Invent Your Own Computer Games with Python</a></li> 58 <li><a class="dropdown-item" href="https://inventwithscratch.com">Scratch 3 Programming Playground</a></li> 59 <li><a class="dropdown-item" href="/pygame">Making Games with Python & Pygame</a></li> 60 <li><a class="dropdown-item" href="/stt">The Simple Turtle Tutorial</a></li> 61 <li><a class="dropdown-item" href="/almost">Almost 100,000 Prime Numbers</a></li> 62 </ul> 63 </li> 64 65 <li class="nav-item dropdown"> 66 <a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">Buy Books</a> 67 <ul class="dropdown-menu"> 68 <li><a class="dropdown-item" href="https://nostarch.com/automate-boring-stuff-python-3rd-edition">Automate the Boring Stuff with Python</a></li> 69 <li><a class="dropdown-item" href="https://nostarch.com/automate-workbook">Automate the Boring Stuff - Workbook</a></li> 70 <li><a class="dropdown-item" href="https://nostarch.com/recursive-book-recursion">The Recursive Book of Recursion</a></li> 71 <li><a class="dropdown-item" href="/amazon-pythongently">Python Programming Exercises, Gently Explained</a></li> 72 <li><a class="dropdown-item" href="https://nostarch.com/big-book-small-python-projects">The Big Book of Small Python Projects</a></li> 73 <li><a class="dropdown-item" href="https://nostarch.com/beyond-basic-stuff-python">Beyond the Basic Stuff with Python</a></li> 74 <li><a class="dropdown-item" href="https://www.nostarch.com/codingwithminecraft">Coding with Minecraft</a></li> 75 <li><a class="dropdown-item" href="https://www.nostarch.com/crackingcodes">Cracking Codes with Python</a></li> 76 <li><a class="dropdown-item" href="https://www.nostarch.com/inventwithpython">Invent Your Own Computer Games with Python</a></li> 77 <li><a class="dropdown-item" href="https://www.nostarch.com/scratch3playground">Scratch 3 Programming Playground</a></li> 78 <li><a class="dropdown-item" href="/amazon-pygame">Making Games with Python & Pygame</a></li> 79 80 </ul> 81 </li> 82 83 <li class="nav-item dropdown"> 84 <a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">Video Courses</a> 85 <ul class="dropdown-menu"> 86 <li><a class="dropdown-item" href="/automateudemy">Automate the Boring Stuff with Python</a></li> 87 <li><a class="dropdown-item" href="https://youtu.be/kSrnLbioN6w?si=DTg7WB4JFYtg_kVb">
87Beyond the Basic Stuff with Python</a></li> 88 <li><a class="dropdown-item" href="https://www.udemy.com/scratch-game-programming/">Scratch</a></li> 89 </ul> 90 </li> 91 92 <li class="nav-item dropdown"> 93 <a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">Projects</a> 94 <ul class="dropdown-menu"> 95 <li><a class="dropdown-item" href="/mazewebsite">Web version of Christopher Manson's Maze</a></li> 96 <li><a class="dropdown-item" href="/tsofa">The Simple, Offline Flashcard App</a></li> 97 </ul> 98 </li> 99 100 <li class="nav-item dropdown"> 101 <a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">Social Links</a> 102 <ul class="dropdown-menu"> 103 <li><a class="dropdown-item" href="https://www.patreon.com/AlSweigart">Patreon</a></li> 104 <li><a class="dropdown-item" href="https://github.com/asweigart/">GitHub</a></li> 105 <!--Cloudflare blocks this. Figure it out later.<li><a class="dropdown-item" href="mailto:[email protected]">Email</a></li>--> 106 <li><a class="dropdown-item" href="https://mastodon.social/@AlSweigart">Mastodon</a></li> 107 <li><a class="dropdown-item" href="https://bsky.app/profile/alsweigart.bsky.social">Bluesky</a></li> 108 <li><a class="dropdown-item" href="https://www.twitch.tv/alsweigart">Twitch</a></li> 109 <li><a class="dropdown-item" href="https://www.linkedin.com/in/al-sweigart-aa41703/">LinkedIn</a></li> 110 <li><a class="dropdown-item" href="https://www.youtube.com/user/Albert10110">YouTube</a></li> 111 <li><a class="dropdown-item" href="https://www.amazon.com/stores/Al-Sweigart/author/B007716TEG">Amazon Author</a></li> 112 </ul> 113 </li> 114 115 <li class="nav-item"> 116 <a class="nav-link" href="/blog">Blog</a> 117 </li> 118 119 <li class="nav-item"> 120 <a class="nav-link" href="/#donate">Donate</a> 121 </li> 122 123 </ul> 124 <form class="d-flex" role="search" action="https://www.google.com/search" method="get"> 125 <input class="form-control me-2" type="search" name="q" placeholder="Search inventwithpython.com" aria-label="Search"/> 126 <input type="hidden" name="as_sitesearch" value="inventwithpython.com"> 127 <button class="btn btn-outline-success" type="submit">🔍</button> 128 </form> 129 </div> 130 </div> 131</nav> 132 133 134 135 136 <div class="container" id="main-container"> 137 <div class="" id="content"> 138<article itemscope="itemscope" 139 itemtype="http://schema.org/WebPage"> 140 <header> 141 <h1 itemprop="name headline">Learn to program. For free.</h1> 142 </header> 143 <div class="content-body" itemprop="text"> 144 <p><strong>Learning to program makes you a smarter and more capable human being.</strong> Rocket science uses programming, but programming isn't rocket science. Whether you're a student preparing for a software career, an office worker buried under spreadsheet files, or a hobbyist who wants to make video games, the Python programming language is an excellent start in the world of programming.</p> 145<p>I'm Al Sweigart, and I write books to teach beginners to code. I put them online for free because programming is too valuable and needs to be accessible to all. (You can also buy print and ebooks versions.) My approach takes out the intimidation so that you can become productive and enjoy the creative aspects of coding.</p> 146<p>Get started today. And good luck on your programming journey!</p> 147<!-- 148## June 2026 News 149 150[<img src="/images/humblebundle-2026-june.png">](https://www.humblebundle.com/books/python-good-stuff-no-starch-books) 151 152[**Pay what you want for 15 Python ebooks in a Humble Bundle benefiting the Python Software Foundation**](https://www.humblebundle.com/books/python-good-stuff-no-starch-books) (Three of them written by me!) 153 154Be sure to click **Adjust Donation**, then click **Custom Amount** and max out the amount going to the PSF charity. 155--> 156 157<h2>Books by Al Sweigart</h2> 158<h3>Automate the Boring Stuff with Python, 3rd Edition</h3> 159<p><img src="/images/cover-automate3-thumb.webp" class="img-float-left img-thumb" alt="Thumbn
159ail cover of Automate the Boring Stuff with Python, 3rd edition"></p> 160<p> 161 <a class="btn btn-primary" href="https://nostarch.com/automate-boring-stuff-python-3rd-edition">Buy from Publisher (Free ebook!)</a> 162 <a class="btn btn-primary" href="https://automatetheboringstuff.com/">Read Online for Free</a> 163</p> 164 165<p><a href="/amazon-automate3">Amazon</a> | <a href="/bn-automate3">Barnes and Nobles</a> | <a href="/powells-automate3">Powell's</a> | <a href="/bookshop-automate3">Bookshop.org</a> | <a href="/goodreads-automate3">Goodreads</a> | <a href="/kobo-automate3">Kobo</a> | <a href="/thriftbooks-automate3">Thriftbooks</a></p> 166<p><strong>Learn Coding for Automation</strong> Everyone in the 21st century needs to learn to code, right? But not everyone needs to become a software engineer or computer scientist. Automate the Boring Stuff with Python is written for office workers, students, administrators, and anyone who uses a computer how to write small, practical programs to automate tasks on their computer.</p> 167<p>You don't need to know all the complexities of algorithms and syntax, you just want to write basic programs to automate mundane computer tasks. In the process, even total beginners will learn to use Python to control their computers without having to learn complex information about computer science. This is a practical programming guide for the rest of us.</p> 168<p>You can also take the video course of this book. <a href="/automateudemy">Use this link to purchase the course for about $14 (about a 70% discount!)</a></p> 169<p><a href="/blog/whats-new-in-the-3rd-edition-of-automate-the-boring-stuff-with-python.html">What's new in the third edition?</a></p> 170<p><b>Review eBook Offer:</b> If you have made at least $50 in purchases in an Amazon account and can write reviews, you may request a review ebook copy in exchange for writing an honest review of the book. <a href="https://forms.gle/irtF5fx1xLsu1mcs6">Fill out this form to be contacted about receiving a review copy of Automate the Boring Stuff with Python, 3rd Edition</a></p> 171<!--TODO - review sign up--> 172 173<h3>Automate the Boring Stuff with Python - Workbook</h3> 174<p><img src="/images/cover-automate3workbook.webp" class="img-float-left img-thumb" alt="Thumbnail cover of Automate the Boring Stuff with Python Workbook"></p> 175<p> 176 <a class="btn btn-primary" href="/nsp-automate3workbook">Buy from Publisher (Free ebook!)</a> 177 <a class="btn btn-primary" href="/automate3workbook">Read Online for Free</a> 178</p> 179 180<p><a href="/amazon-automate3workbook">Amazon</a> | <a href="/bn-automateworkbook">Barnes and Noble</a> | <a href="/bookshop-automate3workbook">Bookshop.org</a> | <a href="/powells-automate3workbook">Powell's</a> | <a href="/kobo-automate3workbook">Kobo</a> | <a href="/thriftbooks-automate3workbook">Thriftbooks</a> | <a href="/goodreads-automate3workbook">Goodreads</a></p> 181<p><b>A companion to <a href="https://automatetheboringstuff.com">Automate the Boring Stuff with Python, Third Edition</a>.</b> This workbook transforms Al Sweigartâs best-selling guide from a reading experience into a coding experience. Following Automate the Boring Stuff with Python chapter by chapter, this workbook will help you turn concepts into muscle memory through carefully designed exercises, projects, and real Python scripts.</p> 182<p>Every concept from Automate is reinforced through carefully sequenced questions, exercises, and projects that help you think like a programmer and prove to yourself that you really get it.</p> 183<p>At the end of each chapter, youâll tackle miniprojects that bring everything together. Whether youâre renaming files, scraping websites, converting text to speech, modifying spreadsheets, or sending emails, youâll build scripts that do real work. Fun projects like image generators and word games are in the mix too, not just boring stuff.</p> 184<p><b>Review eBook Offer:</b> If you have made at least $50 in purchases in an Amazon account and can write reviews, you may request a review ebook copy in exchange for writing an honest review of the book. <a href="https://forms.gle/tg3cs3mqt21UKeDw9">Fill out this form to be contacted about receiving a review copy of Automate the Boring Stuff -- Workbook</a></p> 185<h3>The Recursive Book of Recursion</h3> 186<p><img src="/images/cover_recursion_thumb.webp" class="img-float-left img-thumb" alt="Thumbn
186ail cover of Recursive Book of Recursion"></p> 187<p> 188 <a class="btn btn-primary" href="https://nostarch.com/recursive-book-recursion">Buy from Publisher (Free ebook!)</a> 189 <a class="btn btn-primary" href="/recursion/">Read Online for Free</a> 190</p> 191 192<p><a href="/amazon-recursion">Amazon</a> | <a href="/bn-recursion">Barnes and Noble</a> | <a href="/bookshop-recursion">Bookshop.org</a> | <a href="/goodreads-recursion">Goodreads</a> | <a href="/kobo-recursion">Kobo</a> | <a href="/thriftbooks-recursion">Thriftbooks</a></p> 193<p><strong>Recursion, Understandable by Humans</strong> Recursion, and recursive algorithms, have a reputation for being intimidating. They're seen as an advanced computer science topic often brought up in coding interviews. Moreover, coders often perceive the use of a recursive algorithm as a sophisticated solution that only true programmers can produce. But there's nothing magical about recursion. Its fearsome reputation is more a product of poor teaching than of the complexity of recursion itself.</p> 194<p>This book teaches the basics of recursion, exposes the ways it's often poorly taught, and clarifies the fundamental principles behind all recursive algorithms. It is project-based, containing complete, runnable programs in both Python and JavaScript, and covers several common recursive algorithms for tasks like calculating factorials, producing numbers in the Fibonacci sequence, tree traversal, maze solving, binary search, quicksort and merge sort, Karatsuba multiplication, permutations and combinations, and solving the eight queens problem.</p> 195<p>The book also explains tail call optimization and memoization, concepts often employed to produce effective recursive algorithms, and the call stack, which is a critical part of how recursive functions work but is almost never explicitly pointed out in lessons on recursion. The last chapter, on fractals, culminates with examples of the beautiful fractal shapes recursion can produce.</p> 196<p>If you have made at least $50 in purchases in an Amazon account and can write reviews, you may request a review ebook copy in exchange for writing an honest review of the book. <a href="https://forms.gle/Udgh7bXCnx8FpFwFA">Fill out this form to be contacted about receiving a review copy of XX</a></p> 197<h3>Python Programming Exercises, Gently Explained</h3> 198<p><img src="/images/cover_pythongently_thumb.webp" class="img-float-left img-thumb" alt="Thumbnail cover of Python Programming Exercises, Gently Explained"></p> 199<p> 200 <a class="btn btn-primary" href="/amazon-pythongently">Buy on Amazon</a> 201 <a class="btn btn-primary" href="/pythongently/">Read Online for Free</a> 202</p> 203 204<p><strong>Simple Exercises to Improve Your Skills</strong> Many books and websites have aggressive programming challenges for top coders. However, <em>Python Programming Exercises, Gently Explained</em> is for the rest of us. We want challenges that improve our coding skills, not leave us confused and discouraged. Other tutorials and books have taught you the basics of Python, but the 42 programming exercises in this book let you practice what you've learned. Selected for their simplicity, these programming problems include gentle explanations of the problem, the prerequisite coding concepts youâll need to understand the solution, and helpful templates to put together the programs if you have trouble starting from scratch.</p> 205<p>This is the perfect book for beginner and intermediate programmers who want to test their Python skills but arenât ready to begin professional-level software development. You donât need the frustration of being expected to create complex algorithms and computer science theory; you need a large set of programming challenges that meet you at your level, with gentle explanations.</p> 206<p>The professionally-formatted ebook is <a href="/amazon-pythongently">available on Amazon for 99 cents</a>.</p> 207<h3>The Big Book of Small Python Projects</h3> 208<p><img src="/images/cover_bigbookpython_thumb.webp" class="img-float-left img-thumb" alt="Thumbnail cover of Big Book of Small Python Projects"></p> 209<p> 210 <a class="btn btn-primary" href="https://nostarch.com/big-book-small-python-projects">Buy from Publisher (Free ebook!)</a> 211 <a class="btn btn-primary" href="/bigbookpython/">Read Online for Free</a> 212</p> 213 214<p><a href="/amazon-bigbookpython">Amazon</a> | <a href="/bn-bigbookpython">Barnes and Noble</a> | <a href="/powells-bigbookpython">Powell's</a>
214 | <a href="/bookshop-bigbookpython">Bookshop.org</a> | <a href="/goodreads-bigbookpython">Goodreads</a> | <a href="/kobo-bigbookpython">Kobo</a> | <a href="/thriftbooks-bigbookpython">Thriftbooks</a></p> 215<p><strong>81 Easy Practice Programs</strong> If youâre tired of standard step-by-step tutorials, youâll love the learn-by-doing approach of The Big Book of Small Python Projects. Itâs proof that good things come in small programs! <a href="https://www.youtube.com/watch?v=f9k6Q2yys0k">Watch a video trailer of the projects in this book.</a></p> 216<p>If youâve mastered basic Python syntax and youâre ready to start writing programs, youâll find The Big Book of Small Python Projects both enlightening and fun. This collection of 81 Python projects will have you making digital art, games, animations, counting programs, and more right away. Once you see how the code works, youâll practice re-creating the programs and experiment by adding your own custom touches.</p> 217<p>These simple, text-based programs are 256 lines of code or less. And whether itâs a vintage screensaver, a snail-racing game, a clickbait headline generator, or animated strands of DNA, each project is designed to be self-contained so you can easily share it online.</p> 218<p>Youâll create:</p> 219<ul> 220<li>Hangman, Blackjack, and other games to play against your friends or the computer</li> 221<li>Simulations of a forest fire, a million dice rolls, and a Japanese abacus</li> 222<li>Animations like a virtual fish tank, a rotating cube, and a bouncing DVD logo screensaver</li> 223<li>A first-person 3D maze game</li> 224<li>Encryption programs that use ciphers like ROT13 and Vigenère to conceal text</li> 225</ul> 226<p>If you have made at least $50 in purchases in an Amazon account and can write reviews, you may request a review ebook copy in exchange for writing an honest review of the book. <a href="https://forms.gle/ssPKAgpLy7aLG5ZMA">Fill out this form to be contacted about receiving a review copy of The Big Book of Small Python Projects</a></p> 227<h3>Beyond the Basic Stuff with Python</h3> 228<p><img src="/images/cover_beyond_thumb.webp" class="img-float-left img-thumb" alt="Thumbnail cover of Beyond the Basic Stuff with Python"></p> 229<p> 230 <a class="btn btn-primary" href="https://nostarch.com/beyond-basic-stuff-python">Buy from Publisher (Free ebook!)</a> 231 <a class="btn btn-primary" href="/beyond/">Read Online for Free</a> 232</p> 233 234<p><a href="/amazon-beyond">Amazon</a> | <a href="/bn-beyond">Barnes and Noble</a> | <a href="/bookshop-beyond">Bookshop.org</a> | <a href="/kobo-beyond">Kobo</a> | <a href="/thriftbooks-beyond">Thriftbooks</a></p> 235<p><strong>Bridge the Gap Between Novice and Professional</strong> You've completed a basic Python programming tutorial or finished Al Sweigart's best selling Automate the Boring Stuff with Python. What's the next step toward becoming a capable, confident software developer?</p> 236<p>Welcome to Beyond the Basic Stuff with Python. More than a mere collection of advanced syntax and masterful tips for writing clean code, you'll learn how to advance your Python programming skills by using the command line and other professional tools like code formatters, type checkers, linters, and version control. Sweigart takes you through best practices for setting up your development environment, naming variables, and improving readability, then tackles documentation, organization and performance measurement, as well as object-oriented design and the Big-O algorithm analysis commonly used in coding interviews. The skills you learn will boost your ability to programânot just in Python but in any language.</p> 237<p>If you have made at least $50 in purchases in an Amazon account and can write reviews, you may request a review ebook copy in exchange for writing an honest review of the book. <a href="https://forms.gle/pRzsk4BKUYhrxVJz5">Fill out this form to be contacted about receiving a review copy of Beyond the Basic Stuff with Python.</a></p> 238<h3>Coding with Minecraft</h3> 239<p><img src="/images/cover_codingwithminecraft_thumb.webp" class="img-float-left img-thumb" alt="Thumbn
239ail cover of Coding with Minecraft"></p> 240<p> 241 <a class="btn btn-primary" href="https://www.nostarch.com/codingwithminecraft">Buy from Publisher (Free ebook!)</a> 242 <a class="btn btn-primary" href="https://turtleappstore.com">Read Online for Free</a> <!-- TODO fix site --> 243</p> 244 245<p><a href="/amazon-minecraft">Amazon</a> | <a href="/bn-minecraft">Barnes and Noble</a> | <a href="/bookshop-minecraft">Bookshop.org</a> | <a href="/kobo-minecraft">Kobo</a> | <a href="/thriftbooks-minecraft">Thriftbooks</a></p> 246<p><strong>Program Robots in Minecraft</strong> You've mined for diamonds, crafted dozens of tools, and built all sorts of structuresâbut what if you could program robots to do all of that for you in a fraction of the time?</p> 247<p>In <em>Coding with Minecraft</em>, you'll create a virtual robot army with Lua, a programming language used by professional game developers. Step-by-step coding projects will show you how to write programs that automatically dig mines, collect materials, craft items, and build anything that you can imagine. Along the way, you'll explore key computer science concepts like data types, functions, variables, and more.</p> 248<!-- TODO add note about installing mods --> 249 250<h3>Cracking Codes with Python</h3> 251<p><img src="/images/cover_crackingcodes_thumb.webp" class="img-float-left img-thumb" alt="Cover of Cracking Codes with Python"></p> 252<p> 253 <a class="btn btn-primary" href="https://www.nostarch.com/crackingcodes">Buy from Publisher (Free ebook!)</a> 254 <a class="btn btn-primary" href="/cracking/">Read Online for Free</a> 255</p> 256 257<p><a href="/amazon-cracking">Amazon</a> | <a href="/bn-cracking">Barnes and Noble</a> | <a href="/kobo-cracking">Kobo</a> | <a href="/thriftbooks-cracking">Thriftbooks</a></p> 258<p><strong>Encrypt Messages and Hack Ciphers</strong> <em>Cracking Codes with Python</em> teaches complete beginners how to program in the Python programming language. The book features the source code to several ciphers and hacking programs for these ciphers. The programs include the Caesar cipher, transposition cipher, simple substitution cipher, multiplicative & affine ciphers, Vigenere cipher, and hacking programs for each of these ciphers. The final chapters cover the modern RSA cipher and public key cryptography.</p> 259<!--Cracking Codes with Python is the new edition of the older book, [Hacking Secret Ciphers with Python](/hacking).--> 260 261<p>If you have made at least $50 in purchases in an Amazon account and can write reviews, you may request a review ebook copy in exchange for writing an honest review of the book. <a href="https://forms.gle/5EkDvavY9KcUgLzz5">Fill out this form to be contacted about receiving a review copy of Cracking Codes with Python.</a></p> 262<h3>Invent Your Own Computer Games with Python, 4th Edition</h3> 263<p><img src="/images/cover_invent4th_thumb.webp" class="img-float-left img-thumb" alt="Thumbnail cover of Invent Your Own Computer Games with Python"></p> 264<p> 265 <a class="btn btn-primary" href="https://www.nostarch.com/inventwithpython">Buy from Publisher (Free ebook!)</a> 266 <a class="btn btn-primary" href="/invent4thed/">Read Online for Free</a> 267</p> 268 269<p><a href="/amazon-invent4">Amazon</a> | <a href="/bn-invent4">Barnes and Nobles</a> | <a href="/powells-invent4">Powell's</a> | <a href="/bookshop-invent4">Bookshop.org</a> | <a href="/kobo-invent4">Kobo</a></p> 270<p><strong>Create Computer Games</strong> <em>Invent Your Own Computer Games with Python</em> teaches you how to program in the Python language. Each chapter gives you the complete source code for a new game, and then teaches the programming concepts from the examples. Games include Guess the Number, Hangman, Tic Tac Toe, and Reversi. This book also has an introduction to making games with 2D graphics using the Pygame framework.</p> 271<p>If you have made at least $50 in purchases in an Amazon account and can write reviews, you may request a review ebook copy in exchange for writing an honest review of the book. <a href="https://forms.gle/M5Cp8LoBTwB1eBCX8">Fill out this form to be contacted about receiving a review copy of Invent Your Own Computer Games with Python.</a></p> 272<h3>Scratch 3 Programming Playground</h3> 273<p><img src="/images/cover_scratch3programmingplayground_thumb.webp" class="img-float-left img-thumb" alt="Thumbn
273ail cover of Scratch 3 Programming Playground"></p> 274<p> 275 <a class="btn btn-primary" href="https://www.nostarch.com/scratch3playground">Buy from Publisher (Free ebook!)</a> 276 <a class="btn btn-primary" href="https://inventwithscratch.com/">Read Online for Free</a> 277</p> 278 279<p><a href="/amazon-scratch3">Amazon</a> | <a href="/bookshop-scratch3">Bookshop.org</a> | <a href="/kobo-scratch3">Kobo</a></p> 280<p><strong>Graphical Game Programming for Kids</strong> <em>Scratch 3 Programming Playground</em> teaches you how to program in Scratch, the graphical programming language from MIT for ages 8 to 16. It features 8 game and art projects.</p> 281<p>Scratch 3 Programming Playground is for young adults or parents/teachers who want to lead kids through a fun programming journey. Additionally, there are also many video tutorials on YouTube from the author's website, <a href="https://inventwithscratch.com/">Invent with Scratch</a>.</p> 282<p>There is also an online Udemy course that follows the book, and <a href="https://www.udemy.com/scratch-game-programming/">you can sign up for free</a>.</p> 283<p>If you have made at least $50 in purchases in an Amazon account and can write reviews, you may request a review ebook copy in exchange for writing an honest review of the book. <a href="https://forms.gle/dgDMb9VnweniizZF6">Fill out this form to be contacted about receiving a review copy of Scratch 3 Programming Playground.</a></p> 284<h3>Making Games with Python & Pygame</h3> 285<p><img src="/images/cover_makinggames_thumb.webp" class="img-float-left img-thumb" alt="Thumbnail cover of Making Games with Python & Pygame"></p> 286<p> 287 <a class="btn btn-primary" href="/pygame/">Read Online for Free</a> 288</p> 289 290<p><a href="/amazon-pygame">Amazon</a> | <a href="/goodreads-pygame">Goodreads</a></p> 291<p><strong>Make Python Games with Graphics</strong> Making Games with Python & Pygame covers the Pygame library with the source code for 11 games. Making Games was written as a sequel for the same age range as Invent with Python. Once you have an understanding of the basics of Python programming, you can now expand your abilities using the Pygame library to make games with graphics, animation, and sound.</p> 292<p>The book features the source code to 11 games. The games are clones of classics such as Nibbles, Tetris, Simon, Bejeweled, Othello, Connect Four, Flood It, and others.</p> 293<h2>Online Video Courses</h2> 294<p>You can supplement your book reading with Udemy online video courses for "Automate the Boring Stuff with Python" and "Scratch Programming Playground". Use these links to receive large discounts:</p> 295<center><a href="/automateudemy"><img class="img-thumb" src="images/udemy_automate_thumb.png" style="border-radius: 10%" alt="Udemy Automate course thumbnail"></a></center> 296 297<center><a href="/automateudemy">"Automate" Udemy Course</a></center> 298 299<center><a href="/automateudemy" class="btn btn-primary">70% Discount</a></center> 300 301<p><br></p> 302<center><a href="https://www.udemy.com/scratch-game-programming/"><img class="img-thumb" src="images/udemy_scratch_thumb.png" style="border-radius: 10%;" alt="Udemy Scratch course thumbnail"></a></center> 303 304<center><a href="https://www.udemy.com/scratch-game-programming/">"Scratch" Udemy Course</a></center> 305 306<center><a href="https://www.udemy.com/scratch-game-programming/" class="btn btn-primary">Now free!</a></center> 307 308<h2>The Simple Turtle Tutorial</h2> 309<p><a href="/stt/"><img src="/stt/orig_screenshot_click_spiral.webp" style="float:right; max-width: 25%;"></a>Turtle graphics is an easy way to learn programming by drawing with code. You program a virtual pen, called the turtle, to move around the screen and draw lines. You make pictures with a computer while learning how to program. You can think of the turtle as an Etch A Sketch controlled by your Python program. <a href="/stt/">The Simple Turtle Tutorial</a> explains how to use Python's turtle module.</p> 310<ul> 311<li><a href="/stt/">🇺🇸 🇬🇧 English Version</a></li> 312<li><a href="/stt/es/">🇪🇸 Espanol / Spanish Translation</a></li> 313</ul> 314<h2>YouTube Videos</h2> 315<p>There are several programming tutorial videos I create on my YouTube channel:</p> 316<ul> 317<li><a href="https://youtu.be/1F_OgqRuSdI?si=S1_EpKfH4Syx8Wt7">Free preview</a> of my "Automate the Boring Stuff with Python" Udemy course (<a href="https://inventwithpython.com/blog/automate-boring-stuff-udemy-free-discount.html">Find out how to sign up for free.</a>)</li> 318<li><a href="https://youtu.be/kSrnLbioN6w?si=DTg7WB4JFYtg_kVb">
318Beyond the Basic Stuff with Python</a> video series following the book.</li> 319<li><a href="https://youtu.be/tu0lnL0EbGE?si=PkREA9x_dYQt5rOY">Calm Programming</a>, a no-commentary series where I write programs for chill vibes viewing.</li> 320</ul> 321<!-- These videos are out of date 322- Scratch game programming project tutorials 323- Preview of my "Get Good at Python Programming" Udemy course (under development) 324- "Scratch Blocks in 60 Seconds" series 325- "Blank Editor" series, covering practice coding problems in Python 326--> 327 328<p><a name="donate"></a></p> 329<h2>Open Source Software & Creative Projects</h2> 330<p>Al Sweigart is the creator and maintainer of several open source software and creative projects:</p> 331<ul> 332<li><a href="/tsofa">TSOFA - The Simple, Offline Flashcard App</a></li> 333<li><a href="/mazewebsite">Web version of Maze by Christopher Manson</a></li> 334</ul> 335<!-- 336* PyAutoGUI 337* Pyperclip 338* EZGmail 339* EZSheets 340* PyGetWindow 341* Textarea Terminal JS 342* Bext 343* BextJS 344* pwinput 345* pytweening 346* zombie dice simulator 347* pygcurse 348* CapsLock Morse Code 349* Humre 350* MouseInfo 351* ClipRec 352* PressPlay 353* ShowEval 354* ShowCallstack 355* Snailfill 356* dice command 357* The art of turtle programming 358* Recursive algorithm examples 359* drostedraw 360* pygbutton 361* pybresenham 362* pydidyoumean 363* posterazorapi 364* nicewin 365* nes zelda walking tour 366* mondrian art generator 367* javascript cipher wheel 368* games by example 369* division beads 370* ccwd 371* watch python 372* sushigoround bot 373* easygui (by robert lugg) 374* moosegesture 375* sevseg 376* simongesture 377* computercraft example scripts 378* Fractal Art Maker 379* PyScreeze 380* PyRect 381* PySimpleValidate 382* PyInputPlus 383* PyMsgBox 384* WhatIsMyIp and WhereIsMyIp 385* Tortuga 386* TurtleSC 387* Maze by Christopher Manson website 388* The Scroll Art Museum 389* QBasic Gorilla.BAS Remake 390* Oscar's Turtle 391--> 392 393<h2>Donate</h2> 394<p>All of my books are free under a <a href="https://creativecommons.org/">Creative Commons</a> license. There are several ways you can support my work:</p> 395<ul> 396<li><a href="https://www.patreon.com/AlSweigart">Patreon</a> to set up a monthly donation.</li> 397<li><a href="https://www.paypal.com/donate/?business=6F8H2RVCF9E9L&no_recurring=0&item_name=Thank+you+for+supporting+my+work+to+make+free+coding+materials+available+to+all.+I+truly+appreciate+it.&currency_code=USD">PayPal</a> for individual donations.</li> 398</ul> 399<p>But the best way to support my work is to write Amazon reviews, and copy/paste them to other bookseller websites:</p> 400<ul> 401<li><strong><a href="https://www.amazon.com/stores/Al-Sweigart/author/B007716TEG?ccs_id=e142ba54-40b6-4d97-a365-4e82843ab55f">Amazon Author Page</a></strong></li> 402<li>Python Programming Exercises, Gently Explained <a href="/amazon-pythongently">Amazon</a></li> 403<li>The Recursive Book of Recursion <a href="/amazon-recursion">Amazon</a> | <a href="/goodreads-recursion">Goodreads</a></li> 404<li>The Big Book of Small Python Projects <a href="/amazon-bigbookpython">Amazon</a> | <a href="/goodreads-bigbookpython">Goodreads</a></li> 405<li>Beyond the Basic Stuff with Python <a href="/amazon-beyond">Amazon</a> | <a href="/goodreads-beyond">Goodreads</a></li> 406<li>Coding with Minecraft <a href="/amazon-minecraft">Amazon</a> | <a href="/goodreads-minecraft">Goodreads</a></li> 407<li>Automate the Boring Stuff with Python <a href="/amazon-automate3">Amazon</a> | <a href="/goodreads-automate3">Goodreads</a></li> 408<li>Cracking Codes with Python <a href="/amazon-cracking">Amazon</a> | <a href="/goodreads-cracking">Goodreads</a></li> 409<li>Invent Your Own Computer Games with Python, 4th Edition <a href="/amazon-invent">Amazon</a> | <a href="/goodreads-invent4">Goodreads</a></li> 410<li>Making Games with Python & Pygame <a href="/amazon-pygame">Amazon</a></li> 411<li>Scratch 3 Programming Playground <a href="/amazon-scratch3">Amazon</a> | <a href="/goodreads-scratch3">Goodreads</a></li> 412</ul> 413<h2>About the Author</h2> 414<p><img src="/images/al-sweigart.webp" class="img-float-left" style="border-radius: 50%; height: 100px" alt="Al Sweigart portrait"></p> 415<p>Al Sweigart (rhymes with "why dirt") is a software developer, tech book author, artist, and Fellow of the <a href="https://www.python.org/psf-landing/">Python Software Foundation</a>. He is the maintainer of several open source projects, including <a href="https://github.com/asweigart/pyautogui">PyAutoGUI</a> and <a href="https://github.com/asweigart/pyperclip">pyperclip</a>. He enjoys writing software, <a href="https://scrollart.org">creating digital art</a>, fostering cats, <a href="https://www.redcrossblood.org/donate-blood/how-to-donate/types-of-blood-donations/platelet-donation.html">donating platelets</a>, folding origami, and <a href="https://www.reddit.com/r/DeTrashed/">picking up litter</a>.</p> 416<p>Reports that Al is an AI have been grossly exaggerated.</p> 417 </div> 418 419 420</article> 421 </div><!-- /content --> 422 423 </div><!--/.container /#main-container --> 424 425 <footer id="site-footer"> 426 427 <address id="site-colophon"> 428 <p class="text-center text-muted"> 429 <a href="https://en.wikipedia.org/wiki/Rainbow_flag_(LGBTQ)"><img src="/images/lgbt-flag.png" alt="LGBT Rainbow Flag"></a><br> 430 <a href="https://en.wikipedia.org/wiki/Abolish_ICE">ABOLISH ICE</a> | <a href="https://en.wikipedia.org/wiki/Black_Lives_Matter">BLACK LIVES MATTER</a> | <a href="https://en.wikipedia.org/wiki/Transgender">TRANS RIGHTS ARE HUMAN RIGHTS</a> | <a href="https://en.wikipedia.org/wiki/Progressive_tax">TAX THE RICH</a> | <a href="https://en.wikipedia.org/wiki/United_States_involvement_in_regime_change">LEARN AMERICAN HISTORY</a> 431 </p> 432 <p class="text-center text-muted">
433 Site built using <a href="http://getpelican.com/" target="_blank">Pelican</a> 434 </p> <!-- Theme based on VoidyBootstrap. --> 435 </address><!-- /colophon --> 436 </footer> 437 438 <!-- javascript --> 439
439<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js" integrity="sha384-I7E8VVD/ismYTF4hNIPjVp/Zjvgyol6VFvRkX/vR+Vc4jQkC+hVqc2pM8ODewa9r" crossorigin="anonymous"></script>
439 440
440<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-RuyvpeZCxMJCqVUGFI0Do1mQrods/hhxYlcVfGPOfQtPJh0JCw12tUAZ/Mv10S7D" crossorigin="anonymous"></script>
440 441 442 443
443<script type="module" src="https://static.cloudflareinsights.com/beacon.min.js/v31edd6df95cf4e85bb4c19e7a9bdbcba1788362987495" integrity="sha512-iIg7k2xntmwu6/uSb5tpc/hySgZc4eoL31yB29W6tJFo2akwjPWcEqnCEdJvGexCL0KEQwVYv5BlowfhVz26hg==" data-cf-beacon='{"version":"2024.11.0","token":"8bd877e77db3400e83e36e899a2ab1fd","r":1,"spa":2}' crossorigin="anonymous"></script>
443 444</body> 445</html>
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.