Getting started · Lesson 1 of 25
Your first Python program
What Python is used for, print, and comments.
Python is one of the easiest languages to read: it looks close to English, and indentation (spaces at the start of a line) is part of the code instead of brackets. It's used for AI, data analysis, websites (Django, Flask), automation and scripts, and as a first language at universities.
You write hello.py
The interpreter reads it line by line
The output appears
print() prints whatever is inside it and moves to a new line. A line starting with # is a comment: Python ignores it; it's for people reading the code.
# This is a comment
print("Hello, SeaCode!")
print(7 * 6)
print("Python", "is", "fun")
print("a", "b", "c", sep="-")
print("no new line", end=" | ")
print("same line")The first run can take a few seconds while the runner wakes up.
What's the output?
print("A", "B")
print(2 + 3)What will this code print?
What's the output?
print(1, 2, 3, sep="+")
What will this code print?
Exercise
Print I am learning Python.
Expected output: I am learning Python
# Write your code here
Learn more from
Played 0 of 3 games
Sign in to save your progress and earn XP.