Hour of Python

Python is a great programming language to learn when getting started. It's also a powerful language used by many companies for making and deploying web apps. Learn more.

We hope you enjoy these lessons and tutorials. You can provide us feedback any time. We read and respond to every message.


Free Lessons

Python with Turtles

A visual introduction to code using the Python programming language and Turtles.

Start Learning!

Also Available in Spanish, Chinese, and Korean!

From Blocks to Code

Starting with Blocks, we look at the code underneath and learn some basics of Python!

Let's Go!

String Challenges

Test your knowledge of Python's Strings and learn as you go! Just getting started? Try our Tutorials or Lessons.

Lowercase Challenge

Make text all lowercase using string methods

Uppercase Challenge

Capitalize the first letter of a string

Switch Case Challenge

Make lowercase letters uppercase and vice versa

Aardvark Zebra Challenge

Return Aardvark if a string begins with 'a'

Reverse Challenge

Use Slicing to Reverse a String

Gerund Challenge

Use slicing to conjugate verbs

Oxford Comma Challenge

Correctly format a list of three things

Number of Things Challenge

How many things are there?

Abbreviator Challenge

Long words make you sad? You need an Abbreviator

Turtle Challenges

Learn how to draw fun shapes with our interactive Challenges

Challenge: Bullseye!

Use basic turtle commands like shape, goto and stamp to create a bullseye.

Challenge: Holiday Tree!

Decorate a tree with your own ornaments.


Tutorials

Learn python in short, easy to follow tutorials.

Numbers

Numbers in Python work like numbers you've seen elsewhere.

Logic Expressions

Let's now turn to how it handles inequalities — things that are either true or false.

Words and Letters

Computer scientists have a special word for text: "strings".

Changing Text

Learn other ways to change strings.

Variables

Variables in computer science are pretty different than those in math, even though they're called the same thing.

Conditionals

If statements are how you direct Python to do something if something else is true.

Lists

Python offers a tool called lists to keep track of related "things," or values.

Loops

While loops tell the computer to do something while something else is true.

Dictionaries

Dictionaries are another tool, built-in to Python, to store things. Things in dictionaries can be alike, too, though dictionaries are best used to translate keys to values.

Randomness

Sometimes when programming it's helpful to use random numbers.


Lessons in Other Languages

Una introducción visual a Python

Una introducción visual para aprender a programar Python utilizando tortugas.

Traducción de / translated by Veronica Jimenez

¡Vamonos!

可视化Python简介

使用Python和乌龟对编程的可视化简介

Translated by Jinzhe Liang

开始!

안녕하세요!

파이썬 프로그래밍 언어와 거북이(Turtle)를 이용하는 눈으로 이해하는 코드 튜토리얼을 소개합니다.

Translated by Youngseok Lee

가자!