getbetterat.work
DOC_ID: PY-001
Core Topic

How to talk to computers using simple words.

Python is a tool that lets you give instructions to a machine. Instead of typing complex math or confusing symbols, you type words that look almost exactly like normal English.

It is really this easy
# This tells the computer to show a message
print("Hello, getbetterat.work!")

# This does simple math
score = 10 + 5
print(score)
                

What do people use it for?

Python is famous because it can do almost any job. Here are the main four.

Smart Machines

Teaching computers how to learn. This is how things like face unlock and chatbots are built.

Reading Data

Taking millions of numbers and turning them into simple charts so people can make good choices.

Robot Tasks

Writing a short script to do boring, repetitive clicking or typing for you automatically.

Websites

Building the hidden engine that runs big websites. It handles logins, saving pictures, and messages.

How Python actually works

1. You Type Words

You write simple instructions in a text file.

2. The Translator

Python reads your words and translates them into machine code on the spot.

3. The Computer Acts

The computer understands the translated code and does exactly what you asked.

Why is it called "Simple"?

Look at the difference. Both boxes do the exact same job: telling the computer to say "Hello".

Older Languages (Hard to read)
#include <iostream>

int main() {
    std::cout << "Hello" << std::endl;
    return 0;
}
Python (Easy to read)


print("Hello")


The Free Toolbox

Python is powerful because you do not have to build everything from scratch. Millions of people have already built free tools for you to use. These tools are called "Libraries".

Over 400,000 free tools available

Pandas

A tool that turns messy numbers into neat tables, like a super-powered spreadsheet.

Django

A kit that gives you all the parts needed to build a huge website quickly.

PyGame

A set of parts to help you draw shapes on a screen and build your own video games.

TensorFlow

A heavy-duty tool built by Google to help computers recognize pictures and human voices.

It grows with you

1

The 5-Line Script

Perfect for a single file that just renames all the photos on your computer in one second.

2

The Useful Tool

A program with multiple files that checks the weather every morning and sends you a text message.

3

The Global Website

Massive systems with millions of users. (Instagram and Spotify use Python to run their apps).

The 3 Words You Need to Know

Variables

A variable is just a box with a name on it. You can put data inside the box to save it for later.

name = "John"
age = 25
If / Else

This is how the computer makes choices. "If it is raining, take an umbrella. Else, wear sunglasses."

if money > 10:
  print("Buy lunch")
Loops

Telling the computer to do the exact same thing over and over again without getting tired.

for item in list:
  print(item)
What to Avoid (Bad Habits)
  • Bad Naming Don't name your boxes x or stuff. Nobody will know what is inside them.
  • One Giant File Don't write thousands of instructions in one place. Break them into smaller, clean pieces.
  • Ignoring Errors When the screen turns red with an error message, read it. It tells you exactly what line is broken.
What to Do (Pro Habits)
  • Clear Names Name things exactly what they are, like user_age or total_price.
  • Leave Notes Use the # symbol to write notes in plain English so you remember what the code does later.
  • Ask for Help The Python community is huge. If you are stuck, millions of people online have already solved your exact problem.

Start Your First Project Today

The 4 Flavors of Data

Just like food comes in different flavors, data comes in different types. Python needs to know exactly what it is looking at so it doesn't try to multiply a word by a number.

Text (String)

Just normal words wrapped in quote marks.

"Hello World"
Whole Numbers

Normal math numbers with absolutely no decimals.

42
Decimals

Numbers used for exact measurements, like money.

19.99
Switches

A simple electronic switch. Yes or No. True or False.

True

The Shopping Cart

Sometimes you need to store many things at once. Instead of building 100 different boxes, you build one "List" that holds everything in perfect order.

Python Code
cart = ["Apple", "Bread", "Milk"]

# Pick the first item
# (Computers start counting at 0)
print(cart[0]) 

# The screen will say "Apple"

The Label Maker

A "Dictionary" is a filing cabinet where every single piece of data gets a clear label attached to it. This way, you never forget what the numbers actually mean.

  • Instead of guessing what the number "25" means...
  • You label it clearly as "Age: 25".
player = {
  "name": "Mario",
  "lives": 3,
  "is_tall": False
}

Making Your Own Recipes

If you have to do the exact same task 50 times a day, you shouldn't write the code 50 times. You write it once, save it as a "Recipe", and just call its name whenever you need it.

1
Define It

Teach the computer the steps.

def make_coffee():
  print("Grind beans")
  print("Add water")
2
Use It

Just shout the name of the recipe.

make_coffee()
make_coffee()

Borrowing Magic

You do not have to be a math genius to code. If you need to roll a random dice, someone else already wrote the complex code for it.

You just have to borrow it using the magic word: import.

import random

# Ask the borrowed tool to pick
# a number from 1 to 10
number = random.randint(1, 10)
print(number)

Do Not Panic!

When you make a typo, the screen spits out angry red text. Beginners panic and quit. Professionals know this is just the computer trying to help you find your typo.

What an error actually means:
SyntaxError: expected ':'

Translation: "Hey! I tried to run your code, but you forgot to put a colon (:) at the end of line 4. Just type it in and I will try again!"

Where do you actually type?

Basic Notepad

You can write Python in regular Notepad, but it won't highlight your spelling mistakes or help you write faster.

Industry Standard

VS Code

A free, super-smart notebook by Microsoft. It highlights your text in bright colors so it is extremely easy to read.

The Browser

You can even write Python directly on websites without downloading anything at all. Great for quick tests.

The Community

You have millions of friends.

Coding is an open-book test. Nobody memorizes everything. If you don't know how to do something, you ask Google.

A website called Stack Overflow has answers to almost every Python question ever asked. Using Google is a required professional skill.

8M+ Python Coders
100% Free to Use

The 3 Secret Rules

If you type import this into Python, it prints a secret poem created by the founders. Here are the three most important rules you must always follow:

1. Beautiful is better than ugly. Make it neat and organized.
2. Simple is better than complex. Do not overthink the solution.
3. Readability counts. Write code for humans, not robots.
Career Path

Who will pay you to do this?

Python is not just a toy. It is the core engine behind the highest-paying jobs in the world right now.

Data Analyst

Companies give you thousands of messy spreadsheets, and you use Python scripts to organize them and find out how they can make more money.

Backend Builder

You build the invisible engines behind mobile apps so that millions of users can log in, save their photos, and buy items securely.

AI Engineer

You feed massive amounts of books, math, and images into Python programs so the computer slowly learns how to talk or act like a human.

The Final Rule

You can build anything.

Python is just a set of instructions. Start with simple words, build small tools, and eventually, you will be able to build systems that change the world.