Find a course
Age level: Teens (12–18)BeginnerTechnology & Programming

Python for Teens

Write real programs: games, quizzes and calculators from your first line of code

⏱ 1 h 55 min4 modules · 10 lessons81 practice questionsFinal exam: 20 questions
First name and initial are enough.
Included with this course

Your certificate for this course

Finish the 10 lessons (about 1 h 55 min) and pass the 20-question final exam. Your Certificate of Completion is ready the moment you pass.

  • Your name and this course titlePrinted in classic diploma typography
  • Grade: Pass, Merit or DistinctionOn the gold seal, with your final score
  • Unique ID and QR codeAnyone can verify it in seconds
  • Score report PDFModule-by-module results and exam score
  1. Lessons10 lessons
  2. Final exam20 questions · 70% to pass
  3. CertificatePDF + score report

What you will learn

  • Write and run Python programs that print output and use comments
  • Store data in variables and choose the right type: int, float, str or bool
  • Do calculations with arithmetic operators, including floor division, remainder and powers
  • Read user input, convert it to numbers and format results with f-strings
  • Make decisions with if, elif and else using comparison and logical operators
  • Repeat code with for loops, range() and while loops without creating infinite loops
  • Store, read and update collections of data in lists
  • Write your own functions with parameters and return values, and read common error messages to fix bugs

About this course

Python is the language behind a lot of things you already use: video recommendations, science experiments, school robotics kits, and plenty of the tools that make games and websites run. It's also one of the easiest real programming languages to start with, because the code reads almost like short English sentences.

This free course takes you from zero to writing small programs of your own. You'll start with print() and learn what error messages are actually telling you. Then you'll store information in variables, do math with operators like // and %, and work with text: asking the user for input, gluing strings together and formatting output with f-strings.

Next you'll teach your programs to make decisions with if, elif and else, and to repeat work with for and while loops. You'll use the random module to build a number-guessing game. In the last module you'll store collections of data in lists and package your own reusable tools as functions, then put everything together in a quiz program.

The course is built for teens aged roughly 13 to 18 with no coding experience. Every lesson is short and practical: you'll read a bit of code, predict what it does, spot bugs, put lines in the right order and test your understanding with quick checks. You don't need to install anything to follow along, though trying the examples in a free online Python editor or in Python on your own computer will help a lot.

Finish the lessons and pass the final exam to earn a free certificate of completion you can add to a portfolio, a school application or your profile.

Syllabus

  1. Getting Started With Python

    Run your first program, read error messages without panic, and store information in variables of the right type.

    1. Your First Program11 min
    2. Variables and Data Types12 min
  2. Math, Text and Input

    Make Python calculate for you, then work with text: read what the user types, convert it and format clean output.

    1. Math With Operators12 min
    2. Strings and User Input13 min
  3. Decisions and Loops

    Teach your programs to choose between paths with if statements and to repeat work with for and while loops, then build a guessing game.

    1. Making Decisions With if12 min
    2. Repeating With for Loops12 min
    3. while Loops and a Guessing Game13 min
  4. Lists, Functions and Your First Project

    Store collections of data in lists, package reusable code as functions, and combine every skill from the course into a quiz program.

    1. Lists: Storing Many Values12 min
    2. Writing Your Own Functions13 min
    3. Project: Build a Quiz Game13 min
  5. Final exam and certificate

    20 questions drawn from a pool of 32. Score 70% or more to pass; retakes get a fresh set of questions.

Try a sample question

What does this program show on the screen? `` print("3 + 4") print(3 + 4) ``

  1. 7 and then 7
  2. 3 + 4 and then 3 + 4
  3. 3 + 4 and then 7
  4. An error, because you cannot print math
Show the answer

Answer: C. 3 + 4 and then 7

The first line prints a string: the characters inside the quotes, exactly as written. The second line has no quotes, so Python calculates 3 + 4 first and prints the result, 7. The trap is thinking quotes don't matter; they change text-to-show into math-to-do.

Program
A list of instructions a computer follows, written in a programming language.
Syntax
The spelling and grammar rules of a programming language. Breaking them causes a SyntaxError.
Comment
A note in code that starts with # and is ignored when the program runs.
Variable
A name that refers to a value stored in memory, created with = (for example, score = 0).
Data type
The kind of value something is, such as int, float, str or bool. It decides what you can do with the value.
Integer (int)
A whole number with no decimal point, such as 7, 0 or -12.

Frequently asked questions

Do I need to install Python to take this course?

No. Every lesson works in the browser, and you answer questions about the code on screen. To practice further, you can use a free online Python editor or install Python 3 from python.org on a computer. Phones and tablets work with online editors too.

Is Python a good first language for a teenager?

Yes. Python has simple, readable syntax, so you spend your energy on ideas like variables, loops and functions instead of punctuation. Those ideas transfer directly to JavaScript, Java, C# and other languages if you switch later.

What can I build after finishing this course?

Text-based games, quizzes, calculators, simple grade or budget trackers and small tools that process lists of data. The next steps after this course are files, dictionaries, and libraries for graphics, games (such as Pygame) or data.

How long does it take to learn Python?

You can learn the basics covered here in a few hours. Getting comfortable takes a few weeks of writing small programs regularly. Writing code yourself matters far more than reading about it: aim for short daily practice.

What is the difference between Python 2 and Python 3?

Python 2 is an older version that stopped receiving updates in 2020. Everything in this course is Python 3. If you see code online that writes print without parentheses, like print "hi", it is Python 2 and will not run in Python 3.

Is the certificate an official qualification?

No. It is a certificate of completion showing you finished the lessons and passed the exam. It is a good addition to a portfolio or application, but it is not an academic credit or industry certification.

Sources and further reading

Related courses

Adults & professionalsBeginner

Python for Beginners

Write real programs with variables, loops, lists, dictionaries and functions

Technology & Programming
2 h 15 min12 lessonsCertificate
Adults & professionalsBeginner

JavaScript for Beginners

Variables, functions, arrays, objects, the DOM and async code

Technology & Programming
2 h 10 min12 lessonsCertificate
TeensBeginner

Make Games with JavaScript

Code real browser games with variables, loops, canvas drawing, keys and collisions

Technology & Programming
2 h11 lessonsCertificate
KidsBeginner

Coding for Kids

Algorithms, loops, if-then, variables and bug hunting, then write real JavaScript

Technology & Programming
1 h7 lessonsCertificate
Adults & professionalsBeginner

Git and GitHub Basics

Track changes, branch safely and collaborate with pull requests

Technology & Programming
2 h12 lessonsCertificate
KidsBeginner

Algorithms and Sequences for Kids

Think like a computer: steps, loops, choices, searching and sorting

Technology & Programming
1 h7 lessonsCertificate