print()
x = 42
"hello"
type()
3.14
True
f"{name}"
int()
Unit 1 of 5

Foundations

Every program works with data. Learn how Python stores, labels, and transforms information — the building blocks for everything that follows.

5
Lessons
20
Challenges
1
Project
What You'll Learn

Skills Unlocked in This Unit

💬

Display Output

Use print() to show messages, results, and formatted text.

📦

Store Data in Variables

Create named containers that hold values you can use and change.

🏷️

Master Data Types

Distinguish between strings, integers, floats, and booleans.

🔄

Convert Between Types

Cast values with int(), str(), float() and build f-strings.

⌨️

Accept User Input

Read input and transform it into usable data for your programs.

🧮

Do Math

All arithmetic operators including floor division and modulo.

Try It Now

Data Type Explorer

Type any value below — or click an example — and see how Python interprets it. This is a preview of what you'll master in Lessons 1.3 and 1.4.

🧪 Live Type Inspector

Interactive
Value
"Hello, world!"
Type
<class 'str'>
Truthy?
True
Python sees this as:
📝 String
Lesson Roadmap

Your Path Through Unit 1

Click any lesson to see its challenges. Each one builds on the last.

👋

1.1 Hello, Python!

4 challenges

Write your very first program. Learn print(), understand strings as messages, and see your code come to life.

print() strings escape characters running code
Challenges
First Words — print your name
Three Lines — multi-line output
ASCII Art — draw a shape with print
Escape Artist — use \n and \t
Start Lesson 1.1
📦

1.2 Variables & Assignment

4 challenges

Give names to your data. Create variables, follow naming rules, and learn how reassignment works.

= operator naming rules reassignment swapping values
Challenges
Label It — create player variables
Swap Meet — swap two values
Mini Mad Libs — fill in a story
Name Detective — valid vs. invalid
Start Lesson 1.2
🏷️

1.3 Data Types

4 challenges

Discover the four foundational types: str, int, float, and bool. Learn why types matter and how to inspect them.

str int float bool type()
Challenges
Type Inspector — identify mystery types
True or False? — predict comparisons
Type Sorter — classify 8 values
Frankenstein — cause then fix a TypeError
Start Lesson 1.3
🔄

1.4 Type Conversion & f-Strings

4 challenges

Transform data between types and build beautifully formatted output using Python's f-string syntax.

int() float() str() bool() f-strings
Challenges
Player Card — format with f-strings
Receipt Printer — convert and calculate
User Profile — multi-line f-string card
Truthiness — explore bool() edge cases
Start Lesson 1.4
🧮

1.5 Input & Basic Math

4 challenges

Make your programs interactive with input() and do real calculations with all of Python's arithmetic operators.

input() + - * / // floor div % modulo ** power
Challenges
Calculator — all operations on two nums
Tip Calculator — real-world math
Time Converter — seconds → h:m:s
Temp Converter — F↔C with formatting
Start Lesson 1.5
🏗️

Unit Project Character Creator

capstone

Put it all together! Build a text-based character creator that collects input, calculates stats, and prints a formatted character sheet. Everything from Unit 1 in one program.

variables all data types type conversion f-strings math input
What You'll Build
Collect character name and class via input
Assign base stats as integers
Calculate derived stats with formulas
Print a formatted character sheet
Start Project

Ready to Start Coding?

Lesson 1.1 takes about 15 minutes. No installs, no setup — just you and Python in your browser.

Begin Lesson 1.1
No account required · Progress saves automatically