Theory

Python is a programming language that allows you to give instructions to a computer.

The print() function displays text on the screen. To use it, write:

print("Your text here")

The text must be enclosed in quotes (either "double" or 'single').

Exercises in this lesson

1

Press Check

This is your very first step, and the code is already written for you. Press "Run" to see what it shows on the screen. Then press "Check solution": that is how…

Easy Points: 5
2

Change the Text

print() shows text on the screen. The text sits between quotes. Change the text so the program shows I like Python. Example output: I like Python

Easy Points: 5
3

Quotes on Both Sides

Text needs a quote before it and a quote after it. In the code below one quote is missing. Fix it so the program shows Good morning. Example output: Good…

Easy Points: 5
4

Print a Number

print() can show numbers too. A number is written without quotes. Write a program that shows the number 2026. Example output: 2026

Easy Points: 5
5

Two Lines

One print() shows one line. Add a second print() below the first one so the program shows two lines: Hello and World. Example output: Hello World

Easy Points: 5
6

Close the Bracket

Every opening bracket ( needs a closing bracket ). In the code below one bracket is missing. Fix it so the program shows Python is fun. Example output: Python…

Easy Points: 5
7

Case Matters

Python treats capital and small letters as different letters. The command is print, all small letters. Fix the code so it shows Nice to meet you. Example…

Easy Points: 5
8

Read the Error

This program has a typo. When something is wrong, Python writes an error and tells you the line number. Run the code, read the message and fix that line. The…

Easy Points: 5
9

Hello, World!

Write a program that displays the text "Hello, World!" on the screen. This is the traditional first program that every programmer writes!

Easy Points: 10
10

Your Name

Write a program that displays your name on the screen. For example, if your name is Alex, the program should output: Alex

Easy Points: 10
11

Multiple Lines

Write a program that displays two lines: Line 1: Python Line 2: is awesome! Use two print() statements.

Easy Points: 15
Solve in the playground

Frequently asked questions

What is the lesson “First Steps” about?

Learn how to display text on the screen using the print() function. This is where every programmer starts their journey!

How many exercises are in this lesson?

This lesson has 11 exercises.

Do I need to install anything to do the exercises?

No. The code is written and run in the browser.

Next lesson: Variables →