Skip to content
Python for BeginnersBuy · $29

Write your first program tonight.

Python for Beginners · by the Python For Beginners team

one-time · USD · taxes calculated at checkout

PDF + example filesinstant download

Write your first program tonight.

The Python book for complete beginners. Start from zero, learn to fix your own errors, and build four programs that do real jobs.

  • PDF ebook
  • Example files
  • Real projects
  • Instant download

see the refund policy

Run the first program in the book.

This is hello.py from Chapter 1. Run it, then change print on line 2 into pritn, as if your fingers had slipped, and run it again. Python tells you what’s wrong, where it is, and often how to fix it.

hello.py
output

Python loads when you press Run

ctrl/⌘ + enter to run · real Python, running in your browser

What readers say.

What they built, fixed and kept using.

  • From zero to my first program

    About Chapter 1

    I had never written a line of code, and math was never my thing. By the end of Chapter 1 I had Python installed and my first program running, and when the installer did something odd, Appendix B had the exact fix.

    Laura Bennettadministrative assistant
  • Errors don’t scare me anymore

    About Chapter 3

    Error messages used to make me close the laptop. Now I read them from the bottom up, find the line, change one thing and run it again. That habit alone made the book worth it.

    Daniel Okaforretail store manager
  • It fits around a full-time job

    About Introduction

    I work full time, so I did one section most evenings after dinner. Each section is short enough to finish in one sitting, and I never felt lost when I picked the book up again.

    Priya Ramanlogistics coordinator
  • Dinner bill, split in seconds

    About Project 1

    The bill splitter was the first program I actually used. At a dinner with friends it worked out the tip and everyone’s share before anyone had found the calculator on their phone. It also explained why my first answer came out as 24.840000000000003.

    Marcus Halegraphic designer
  • I can see where my money goes

    About Project 2

    I swapped the book’s categories for my own in the budget checker, and the report flagged eating out as over budget for the third month running. It’s the first budget I’ve actually kept up with.

    Sofia Morenophysiotherapist
  • My job search, finally organized

    About Project 3

    I built the job application tracker while I was looking for work, then kept using it for my real applications. The follow-up reminder flagged two companies I’d forgotten to chase.

    Tom Whitfieldformer restaurant manager, now changing careers
  • My monthly report builds itself

    About Project 4

    Every month I copied sales figures from three files into a spreadsheet by hand. My version of the report builder now does it in seconds, formatted and with the totals checked. That’s about three hours a month back.

    Aisha Rahmanbookkeeper
  • Years of clutter, sorted safely

    About Chapter 14

    My Downloads folder had years of clutter. The Chapter 14 program sorted it into folders, and I trusted it because it showed me its plan with a dry run before it moved a single file.

    James Callowayfreelance photographer
  • Now I trust my totals

    About Chapter 13

    I didn’t expect a beginners’ book to teach testing. Now, whenever I change my report script, pytest tells me in a second whether the totals are still right.

    Elena Petrovaoperations analyst
  • Slow at first, but it sticks

    About Introduction

    Typing every example felt slow at first, but it’s why the code stuck. Working out the answer on paper before writing the program means I know when my program is right, not just when it runs.

    Kenji Tanakaparalegal
  • Practice I can check on my own

    About Appendix E

    Every chapter ends with a practice program, and the full solutions are at the back of the book and in the example files. I could try on my own first and still check my work at midnight without waiting for anyone.

    Grace Lindqvistcustomer service team lead
  • I know what to learn next

    About Appendix G

    I finished with four programs I actually use, and Appendix G gave me a clear next step. The budget project got me hooked on data, so I’ve started learning pandas.

    Omar Haddadmarketing coordinator

readers who bought the book · shared with their permission

Four programs you’ll build.

Each part of the book ends with a project: one complete program that does a real job. You build it in four steps, and it runs after every one.

  1. P1

    A Bill Splitter

    Four friends, an $86.40 dinner and a 15% tip: everyone’s share in a few seconds, right every time.

    from the run printed on p. 50

    Bill before tip:   $86.40Tip:               $12.96Total with tip:    $99.36People:            4-------------------------------Each person pays:  $24.84

    Part I · chapters 1–4 · 4 steps · 8 pages

  2. P2

    A Monthly Budget Checker

    Log your spending as you go and see, category by category, where you stayed on track and where you went over.

    from the run printed on p. 98

    groceries       343.45    300.00  114%  <- over by 43.45eating out      168.90    150.00  113%  <- over by 18.90Total         1,434.35  1,500.00   96%Over budget: groceries, eating out

    Part II · chapters 5–8 · 4 steps · 10 pages

  3. P3

    A Job Application Tracker

    Every application saved from one day to the next, and a flag when an employer has gone quiet for 10 days.

    from the run printed on p. 151

    Applications on file: 4Follow-ups due: 2. Choose 4 to see them.Greenfield Library: no news for 14 daysCopperline Logistics: no news for 11 days

    Part III · chapters 9–12 · 4 steps · 12 pages

  4. P4

    A Monthly Report Builder

    A bakery’s three shops send their sales files. Your program turns them into one formatted spreadsheet, archives them and tests the sums.

    from the run printed on p. 187

    15 rows from 3 files.Sales by shop  Harbour     6,534.60  Market      4,649.50  Station     5,447.20Total sales: 16,631.30

    Part IV · chapters 13–15 · 4 steps · 10 pages

Small programs, real answers.

Each section adds one idea, shows it in a few lines of code and has you run it. These six come straight from the book, with the output they print.

  • print("Two coffees:", 2 * 2.80)
    print("Three coffees:", 3 * 2.80)
    Two coffees: 5.6
    Three coffees: 8.399999999999999

    Numbers, honestly

    Three coffees at 2.80 come to 8.399999999999999. Nothing is broken, and Chapter 2 shows why, and how to round money.

  • age = int(input("How old are you? "))
    
    if age < 12:
        print("You get the child price.")
        print("Your ticket costs $6.")
    
    print("Enjoy the film!")
    How old are you? 8
    You get the child price.
    Your ticket costs $6.
    Enjoy the film!

    Decisions with if

    A child’s cinema ticket, free museum entry, free shipping from $50: your program picks the right path.

  • thickness = 0.1
    everest = 8849000
    folds = 0
    while thickness < everest:
        thickness = thickness * 2
        folds = folds + 1
    print("Folds needed:", folds)
    Folds needed: 27

    Loops that keep going

    How many folds until a sheet of paper is taller than Everest? A while loop finds out: 27.

  • prices = [2.49, 3.10, 0.99, 4.25]
    total = 0
    for price in prices:
        total += price
    print(f"Total: {total:.2f}")
    Total: 10.83

    Lists that add up

    Keep a whole receipt in one list and let a loop total it, however long it gets.

  • def greet(name):
        print(f"Hello, {name}!")
        print("Nice to see you.")
    
    greet("Ana")
    greet("Tom")
    Hello, Ana!
    Nice to see you.
    Hello, Tom!
    Nice to see you.

    Functions you can reuse

    Name a piece of work once, then run it as often as you like, with different information each time.

  • from datetime import date, timedelta
    
    today = date(2026, 10, 19)
    holiday = date(2026, 12, 24)
    wait = holiday - today
    print(wait.days, "days to go")
    66 days to go

    Dates without counting

    Subtract one date from another and Python counts the days for you, leap years included.

Error messages are on your side.

Everyone gets them, every day. Chapter 3 teaches you to read one from the bottom up, find the mistake and fix it, calmly and in the same order every time.

cafe.pysection 3.2
print("Welcome to the cafe")
print("One coffee costs 2.50")
Print("Two coffees cost 5.00")
$ python cafe.pyWelcome to the cafeOne coffee costs 2.50Traceback (most recent call last):  File "/home/sam/python_book/cafe.py", line 3, in <module>    Print("Two coffees cost 5.00")    ^^^^^NameError: name 'Print' is not defined. Did you mean: 'print'?

read it from the bottom up

When you’re stuck, try these in order

  1. 1

    Read the error message from the bottom. The last line names the problem, and the File line tells you which line of your program to check.

  2. 2

    Compare your code with the book’s, character by character. Most mistakes hide in quote marks, brackets, colons, capital letters, and spaces at the start of lines.

  3. 3

    Run the book’s version from the example files. If it works and yours doesn’t, the difference is in your typing.

  4. 4

    Take a break. Ten minutes away often turns an impossible problem into an obvious one.

  5. 5

    Ask the right way. Chapter 3 shows how to use the documentation, forums and AI assistants without skipping the learning.

chapter 3 · reading errorsappendix B · install fixesappendix C · error quick reference

What's inside.

15 chapters, 4 projects and 7 appendices: 310 pages from installing Python to building a formatted spreadsheet report. Every chapter ends with a Practice exercise, solved in Appendix E.

IntroHow to Use This Book4 pages

How the book works, and the habits that carry you through it.
  1. Who this book is for
  2. How the chapters and projects fit together
  3. Why you should type every example yourself
  4. What to do when you get stuck
  5. Getting the example files and solutions

Part IFirst Steps48 pages

Install Python, run your first program and read error messages without panic. Ends with A Bill Splitter. Chapters 1–4.
  1. 1Installing Python and Running Your First Program8 pages

    Put Python on your computer and run a program of your own, starting from zero.

    1. 1.1What a program is and why Python is a good first language
    2. 1.2Installing Python on your computer
    3. 1.3Talking to Python in the interactive shell
    4. 1.4Writing, saving, and running your first program file
    5. 1.5Your first error message, and why it's good news
    6. 1.6PracticeMake the computer introduce you
  2. 2Working with Numbers and Text12 pages

    See how Python treats numbers and text, until the shell is the most patient calculator you own.

    1. 2.1Values and types: numbers and text
    2. 2.2Doing arithmetic and the order of operations
    3. 2.3Writing text with strings
    4. 2.4Changing text with methods: case, spaces, and replacements
    5. 2.5Leaving notes with comments
    6. 2.6PracticeUse Python as your everyday calculator
  3. 3Reading Error Messages and Fixing Mistakes10 pages

    Read an error from the bottom up, find the mistake and fix it, in the same order every time.

    1. 3.1Why errors are normal, even for professionals
    2. 3.2Reading an error message from the bottom up
    3. 3.3The five errors you'll meet most often
    4. 3.4A step-by-step method for finding the problem
    5. 3.5Getting help from documentation, forums, and AI assistants
    6. 3.6PracticeFix five broken programs
  4. 4Storing Information and Asking for Input10 pages

    Give values names, drop them into sentences and let the user type their own answers.

    1. 4.1Giving names to values with variables
    2. 4.2Updating variables and choosing good names
    3. 4.3Putting values inside text and formatting numbers
    4. 4.4Asking the user a question
    5. 4.5Turning text answers into numbers
    6. 4.6PracticeBuild a unit converter
  5. P1A Bill SplitterSplit a dinner bill, tip included, in a few seconds.4 steps · 8 pages

    Four friends, an $86.40 dinner bill and a 15% tip: each person's share in a few seconds.

    Uses Chapters 1–4. The program runs after every step and does a little more each time.

    1. P1.1Planning the program on paper
    2. P1.2Asking for the total, the tip, and the number of people
    3. P1.3Calculating each person's share
    4. P1.4Printing a clear summary and trying it with real bills

Part IIMaking Decisions and Working with Collections48 pages

Make programs choose, repeat and remember groups of things. Ends with A Monthly Budget Checker. Chapters 5–8.
  1. 5Making Decisions with Conditions10 pages

    Ask yes-or-no questions about a value, choose what runs next and survive unexpected input.

    1. 5.1True or false: comparing numbers and text
    2. 5.2Doing something only when a condition is true: blocks and indentation
    3. 5.3Choosing between several paths
    4. 5.4Combining conditions with and, or, and not
    5. 5.5Planning for failure: trying something and catching the error
    6. 5.6PracticeA shipping-cost calculator with discounts
  2. 6Repeating Actions with Loops10 pages

    Count, add things up, keep a menu on screen and keep asking until the answer makes sense.

    1. 6.1Repeating while a condition is true
    2. 6.2Repeating a fixed number of times
    3. 6.3Keeping counts and running totals
    4. 6.4Building a menu that repeats until you quit
    5. 6.5Asking again until the answer is valid
    6. 6.6PracticeA savings-growth table
  3. 7Keeping Collections of Items in Lists10 pages

    Keep a whole group of values together: add, change, sort and go through them.

    1. 7.1Creating a list and reaching items by position
    2. 7.2Adding, changing, and removing items
    3. 7.3Going through a list with a loop
    4. 7.4Sorting, counting, and summarizing
    5. 7.5Splitting text into lists and joining it back
    6. 7.6PracticeA shopping list manager
  4. 8Organizing Information with Dictionaries8 pages

    Store information under names, look it up, count things and describe records.

    1. 8.1Looking things up by name: keys and values
    2. 8.2Adding, updating, and removing entries
    3. 8.3Going through a dictionary with a loop
    4. 8.4Counting things with a dictionary
    5. 8.5Combining lists and dictionaries to describe records
    6. 8.6PracticeA contact book
  5. P2A Monthly Budget CheckerLog your spending as you go and see where you went over, category by category.4 steps · 10 pages

    Set a budget for rent, groceries, transport, eating out and fun, then see where you went over.

    Uses Chapters 5–8. The program runs after every step and does a little more each time.

    1. P2.1Setting a budget for each category
    2. P2.2A menu to add expenses, with checks for bad input
    3. P2.3Totals and percentages per category
    4. P2.4A report that flags where you've overspent

Part IIIOrganizing Your Code and Saving Your Data52 pages

Write your own functions, split code into modules and save data to files. Ends with A Job Application Tracker. Chapters 9–12.
  1. 9Writing Your Own Functions10 pages

    Name a piece of work once and reuse it, so a program reads like a table of contents.

    1. 9.1Naming a piece of work: defining and calling functions
    2. 9.2Passing information in with parameters and default values
    3. 9.3Getting results back with return
    4. 9.4Where variables live: inside and outside functions
    5. 9.5Describing what a function expects and returns
    6. 9.6PracticeTurn your earlier programs into functions
  2. 10Reusing Code with Modules and Packages10 pages

    Use Python's toolbox, split your own code into files and install free packages.

    1. 10.1Importing modules from the standard library
    2. 10.2Working with dates and times
    3. 10.3Splitting your program into your own modules
    4. 10.4Installing packages from the terminal
    5. 10.5Keeping each project's packages separate
    6. 10.6PracticeA days-until-the-deadline calculator
  3. 11Reading and Writing Files10 pages

    Programs that remember: read, write and save data so it is still there tomorrow.

    1. 11.1Where files live: paths and folders
    2. 11.2Reading a text file
    3. 11.3Writing and adding to a file
    4. 11.4Handling missing files and other surprises
    5. 11.5Saving structured data you can load later
    6. 11.6PracticeA journal that keeps your entries
  4. 12Working with Spreadsheet Data10 pages

    Read CSV files from your bank or fitness app, filter and add up rows, save a new file.

    1. 12.1What CSV files are and where you'll find them
    2. 12.2Reading rows as records
    3. 12.3Filtering and summarizing rows
    4. 12.4Writing results to a new file
    5. 12.5PracticeAnalyze a bank statement export
  5. P3A Job Application TrackerTrack every application, keep its status current and know when to follow up.4 steps · 12 pages

    Records, a menu, functions, dates and a saved file in one program that flags what needs a follow-up.

    Uses Chapters 9–12. The program runs after every step and does a little more each time.

    1. P3.1Deciding what to record for each application
    2. P3.2Functions to add, update, and list applications
    3. P3.3Saving and loading the tracker from a file
    4. P3.4Flagging applications that need a follow-up

Part IVPutting Python to Work40 pages

Test your code, tidy folders automatically and build Excel reports. Ends with A Monthly Report Builder. Chapters 13–15.
  1. 13Checking Your Programs with Tests10 pages

    Write small pieces of code that check your code, and run them in a second.

    1. 13.1Why test, and what to test
    2. 13.2Checking results with assertions
    3. 13.3Writing and running automated tests
    4. 13.4Testing the awkward cases: empty, zero, and wrong input
    5. 13.5PracticeAdd tests to your job application tracker
  2. 14Organizing Files and Folders Automatically10 pages

    Sort a messy Downloads folder in a second, and show a plan before touching a single file.

    1. 14.1Listing what's inside a folder
    2. 14.2Finding files by name, type, or date
    3. 14.3Copying, moving, and renaming files
    4. 14.4Doing a dry run before changing anything
    5. 14.5PracticeTidy up your downloads folder
  3. 15Creating and Updating Spreadsheets10 pages

    Read Excel files, write new ones, add formulas and format a report people want to read.

    1. 15.1Opening a workbook and reading cells
    2. 15.2Going through rows and columns
    3. 15.3Writing values and formulas
    4. 15.4Formatting a report people will want to read
    5. 15.5PracticeTurn a data file into a formatted report
  4. P4A Monthly Report BuilderTurn a month of sales files into one tidy spreadsheet.4 steps · 10 pages

    A bakery with three shops: their monthly sales files become one formatted spreadsheet, archived safely, with tests.

    Uses Chapters 13–15. The program runs after every step and does a little more each time.

    1. P4.1Collecting this month's files from a folder
    2. P4.2Combining and summarizing the data
    3. P4.3Building the formatted spreadsheet
    4. P4.4Archiving processed files safely, with tests for the calculations

Appendices118 pages

Terminal, install fixes, error lookup, quick reference, solutions, glossary and next steps.
  • ATerminal BasicsType every command once, then keep section A.10 as a one-page cheat sheet.12 pages
  • BFixing Installation ProblemsFind your message on screen, try one fix, check it worked.10 pages
  • CError Messages Quick ReferenceWhat each error means, a program that causes it and the usual fix.16 pages
  • DPython Quick ReferenceOne table per topic; every row points back to the section that teaches it.22 pages
  • ESolutions to the Practice ExercisesOne working solution per chapter, with the output of a real run.26 pages
  • FGlossary269 terms in plain words, each linked to the section that explains it.22 pages
  • GWhere to Go NextLook back at what you can do now, then choose: automate, analyze data, build websites, make games.10 pages

How the book works.

Read it in order: every chapter uses only what came before it.

Part I4 chapters of short sections, each ending in a Practice exercise, then Project 1, A Bill Splitter, in 4 steps
  1. Example first

    every section

    Each section shows a short program and the output it prints, then explains it. Sections are short, so you can stop at the end of any one.

  2. Type it, don’t paste it

    every example

    Typing trains your eyes, gives you small mistakes to fix and makes the code yours. The example files are there to check against, not to copy.

  3. Practise, then check

    end of every chapter

    Every chapter ends with a program to write on your own, with the result to aim for and a couple of hints. Appendix E has a worked solution for each.

  4. Build it in steps

    end of every part

    Each project grows in four steps, and your program runs after every one. If something breaks, you only look at what you just changed.

Look inside.

Real pages from the book: short sections, the code you type and the exact output you should see.

Python for Beginners When you’re stuck, try these in order Getting the example files and solutions Every program in this book, including each step of the projects, is in the example files. Download them from the same place you got this book. They come as one ZIP file, which is a folder packed into a single file. Extract it somewhere easy to find, such as Documents. On Windows, right-click it and choose Extract All; on a Mac, double-click it; on Linux, use your file manager’s Extract option. Inside, there’s one folder for each unit of the book: python-for-beginners/ what’s inside the example files python-for-beginners/ ├── intro/ │ └── hello.py the example from this introduction ├── ch01/ … ch15/ one folder for each chapter ├── p1/ … p4/ one folder for each project └── solutions/ the programs from Appendix E Data files sit next to the examples that use them. Each project folder holds the program as it stands after every step, so you can catch up if you fall behind. The solutions to the Practice exercises are printed in Appendix E and saved in the solutions folder, so you can run them. Look at a solution only after a real attempt. If your program works but looks different, that’s fine: there’s usually more than one right answer. Every example in this book was run with Python 3.12 or later, and the output you see is copied from those runs, not typed by hand. Newer versions may word a few error messages slightly differently, or show them in color. That’s normal. That’s all you need to know before you begin. Turn to Chapter 1, and let’s install Python. Read the error message from the bottom. The last line names the problem, and the File line tells you which line of your program to check. 1 Compare your code with the book’s, character by character. Most mistakes hide in quote marks, brackets, colons, capital letters, and spaces at the start of lines. 2 Run the book’s version from the example files. If it works and yours doesn’t, the difference is in your typing. 3 Take a break. Ten minutes away often turns an impossible problem into an obvious one. 4 Ask for help. Chapter 3 shows you how to use the documentation (Python’s official manual), forums, and AI assistants. If an assistant writes code for you, ask it to explain every line, so you still do the learning. 5 4
hello.py 1 print("Hello, world!") Hello, world! I s li gP h na d n taln yt o n R n i gY u u nn o r r g a P o r m Chapter 1 · Part I, First Steps · 6 sections By the end of this chapter you will have Python on your computer and a program of your own that runs. Y ou donʼt need any experience. We start from zero. 1. 1 What a program is and why Python is a good first language You have already followed a program, even if you never called it that. Think of a recipe. It is a list of steps, written in order. Follow them exactly and you get the same dish every time. A program is a recipe for a computer: a list of instructions, written in order, that the computer follows to get a result. An instruction is one small step, such as “show this message” or “add these two numbers” . The computer is the cook. It is fast and it never gets tired, but it does only what the steps say, and nothing more. A computer cannot read an English recipe. The instructions have to be written in a programming language: a fixed set of words and rules that a computer can follow. There are hundreds of them. This book teaches Python. hello.py print("Hello, world!") Python output Hello, world! 1. Y ou write instructions in a file 2. Python reads one line at a time 3. The computer acts and shows the result Figure 1.1 You write instructions in a file. Python reads them and makes the computer carry them out. First 5

pp. 4–5 of 310, Chapter 1: Installing Python and Running Your First Program

pages exactly as printed in the PDF · pinch to zoom. Use the arrow keys to turn the pages.

The details.

Everything you get, before you pay.

your downloads
  • python-for-beginners.pdf

    PDF · 310 pages
    15 chapters · 4 projects · 7 appendices

    look inside
    look inside
  • python-for-beginners-examples.zipZIP · 272 files · every program in the book
    python-for-beginners/├── intro/│   └── hello.py        the example from this introduction├── ch01/ … ch15/       one folder for each chapter├── p1/ … p4/           one folder for each project└── solutions/          the programs from Appendix E
Level
Complete beginner
Python
3.12 or later
Language
English
Licence
Personal use, one reader
You’ll need
A Windows, macOS or Linux computer
Delivery
Instant download after payment
Access
Re-download any time from your Polar library
Price
$29one-time · USD · taxes calculated at checkout

This book is for you if…

  • You’ve never written a line of code, or you tried and got lostChapter 1
  • You want to automate a dull part of your job, change careers, or understand what programmers do all dayPart IV
  • You learn by typing and running small programs, not by watchinghow it works
  • You want one path, in order, with a solution for every exerciseAppendix E

It’s probably not for you if…

  • You already write Python at work
  • You want data science, websites or games taught in depth (Appendix G points the way)Appendix G
  • You want to code on a tablet or phone
  • You want video lessons

About Python For Beginners.

Python For Beginners

The team behind Python for Beginners

Python For Beginners is a team of Python experts with one goal: helping complete beginners learn PythonThe programming language this book teaches. The program that runs your code is called Python too.Intro · 1.1 · Appendix F, 269 terms. This book is how we do it: a Python book for beginners that starts from zero and ends with four programA list of instructions, written in order, that a computer follows to get a result.Intro · 1.1 · Appendix F, 269 terms that do real jobs.

We wrote it the way we’d want to learn. Every chapter uses only what came before it, every section shows the codeThe text you write to give a computer instructions.Intro · Appendix F, 269 terms before it explains it, and a 269-term glossary catches any word you forget. Every example was run on Python 3.12 or later, and the outputWhat a program shows on the screen when it runs. In this book it’s printed on a black panel.Intro · P1.1 · Appendix F, 269 terms on the page is copied from those runs, not typed by hand.

Getting stuck is part of learning, so the book plans for it.

Everything you need to keep going is in the book.

Questions? Answers.

About the book, the example files and buying it.

Is this really for complete beginners?

Yes. It’s written for adults who have never written a line of code. If you can use a web browser, save a file and find it again later, you know enough to start. Each chapter builds only on the ones before it.

Do I need to be good at maths?

No. Nothing in the book needs more than everyday arithmetic: adding, subtracting, multiplying and dividing.

What do I need to start?

A desktop or laptop running Windows, macOS or Linux (the book is written for a computer, not a tablet or phone), and regular short sessions. Chapter 1 walks you through installing Python, and Appendix B covers the problems people hit most often.

What exactly do I get?

A 310-page PDF and a ZIP of example files: every program in the book, each project as it stands after every step, the data files the examples read, and the solutions from Appendix E. The PDF opens on any phone, tablet or computer, and you can print it.

Which version of Python does it use?

Python 3.12 or later. Every example was run on Python 3.12 or later, and the output you see is copied from those runs. Newer versions may word a few error messages slightly differently, which is normal.

Why learn to code when AI can write it?

Because you still need to know whether the code is right. Section 3.5 shows you how to use an AI assistant as a tutor: ask it to explain an error, not only to fix it, and check its answer by running it, because an assistant can sound sure and still be wrong.

How do I receive the ebook?

Right after payment your downloads are ready on the confirmation page, and Polar emails you a receipt with a link to your library.

I lost the files. Can I download them again?

Yes. Open your Polar library with the email you used to buy, enter the one-time code it sends you, and download the PDF and the example files again. There’s a link in the footer.

Can I get a refund?

Because the files are delivered instantly, you agree at checkout to immediate access and lose the 14-day right of withdrawal once they’re available. If a file is faulty, not as described, or you were charged twice, you’re still covered: see the refund policy.

How can I pay? Do I get an invoice?

Checkout is handled by Polar, our merchant of record. You can pay by card, and in some countries with local methods such as iDEAL or Bancontact. PayPal is not available. Polar calculates any VAT or sales tax for your country and emails you an invoice.

Still unsure? Run Chapter 1 above, or look inside the book.

Stop googling every error.

Learn to read what Python tells you, fix it yourself, and finish with four programs that do real jobs.

PDF + example files · instant download · invoice by Polar

PDF + examples · $29buy the ebook