TechnologyThe BestieBeginner
Writing Useful Python Scripts, a free technology course on Tomo

Writing Useful Python Scripts

Learn to write real Python code to automate everyday tasks and crunch data. Start by manipulating text and numbers, branch into smart decision-making, and finish by building reusable scripts.

Like Duolingo, but for Writing Useful Python Scripts. Tomo turns the whole topic into a game you play five minutes a day, until it actually sticks.

A short one: 12 levels across 2 sections, about 24 minutes end to end, roughly 5 days at five minutes a day. It moves through Making Python Do Real Work and Automating Repetitive Tasks. It starts from scratch.

12 bite-size levelsAbout 5 minutes each

Free forever · No credit card · iPhone & Android

Pip the Python, the guide who teaches the Writing Useful Python Scripts course
Writing Useful Python Scripts
with Pip the Python
12
Levels
2
Sections
5
Min/day
What you'll learn

Key ideas in Writing Useful Python Scripts

  • In Python, assigning a value to a variable name stores it for repeated use later in the script
  • Changing the value stored in a variable automatically updates every calculation that references that variable name
  • Writing raw numbers repeatedly forces you to hunt down and change every occurrence manually
  • Python treats the + operator as arithmetic addition when applied to numbers
  • Python treats the + operator as text concatenation when joining two strings together end-to-end
  • Quoted digits are treated as text characters rather than numeric values
  • Placing an 'f' immediately before the opening quote creates an f-string in Python
  • Curly braces {} inside an f-string tell Python to evaluate and display the variable or calculation inside them
  • Without the 'f' prefix, Python treats curly braces and the text inside them as literal text characters
  • Python's input() function halts the script and waits for the user to press Enter
  • Everything captured by input() is returned as a string, even if the user typed solely numeric digits
  • Python raises a TypeError if you try to add a raw string from input() directly to an integer
  • Converting text digits with int() turns the string into an actual number that Python can perform math on
  • Adding '1' as text would simply tack the character '1' onto the end instead of doing arithmetic
  • Comparison operators like > and == evaluate numbers and produce either True or False in Python
  • == checks whether two values are equal, while != checks whether they are different
Why not just Google it

You've tried the other tabs

Wikipedia

Thirty open tabs. Four facts you actually kept.

YouTube

You watched. You nodded. By Sunday it was gone.

ChatGPT

One answer, then back to scrolling.

Online courses

Eight weeks. You meant to finish. You didn't.

Tomo gives Writing Useful Python Scripts the Duolingo treatment: levels, streaks, and quick quizzes that test what you just learned. That game loop is what the tabs above never had, so it's the one you actually finish.

Try a question

Here's what playing it feels like

A real question from this course. Take your best guess.

Saving Values and Adding Things Up

What happens when you change the value stored in a variable that you used across several calculations?

Get it right to open this lesson and 11 more in the app.

Course map

Where Writing Useful Python Scripts takes you

  1. 1

    Making Python Do Real Work

    • Running Calculations and Interactive Prompts
    • Guiding Actions with Conditional Logic
  2. 2

    Automating Repetitive Tasks

    • Wrangling Lists with Loops
    • Packaging Reusable Functions and Handling Errors

2 sections · 4 units · 12 levels. Built to play, not to enroll.

New

Tomo is in ChatGPT

Tomo is also a ChatGPT plugin: the same playable courses, built and played inside your chat.

Add Tomo to ChatGPT
How it's taught

You pick the voice

This course
The Bestie

Writing Useful Python Scripts is taught in the Bestie style: your friend who just gets it. Want a different feel? In the app you can spin up the same topic in any of Tomo's teaching styles. Same facts, totally different vibe.

Start free

Start Writing Useful Python Scripts today.

Download Tomo, search Writing Useful Python Scripts, and play your first lesson in under a minute.