B4Coder
0%
LessonAbout 4 min

Chapter 1 · Lesson 1 of 5

01. Your first program

What Python is, and a program that shows a message on the screen with print().

A program is a list of instructions for the computer. Python is a language for writing them: it reads almost like English, so it's one of the most popular first languages, and it's used for real work too, from websites to science to AI.

Here's a whole Python program. It has one instruction: show the words on the screen.

Python
print("Hello, World!")

It shows

Hello, World!

print means *show this*. What to show goes inside the round brackets ( ). Words go inside quote marks " ", so Python knows they're text to show, not instructions.

Your program goes in, Python follows it, and what it prints comes out.

Your turn

1Steps

  1. 1Write your own program that prints I am learning Python! exactly: capital I, capital P, and the exclamation mark.

Use: print()

2Expected output

It should show

I am learning Python!

3Hints

Stuck? Open one hint at a time: each gives a bit more help.

Hint 1

It's one line, made the same way as the Hello, World! program, with different words.

Hint 2

Start with print, then round brackets, and the words inside quote marks inside the brackets.

Hint 3

Capitals and the ! all count. The words inside the quotes are I am learning Python!

Terminal

Click Run to see what your program shows, then Submit answer to check it and unlock Next.