Python Basics
Lesson 1 / 75
Pito
print() and your first program
Showing text and numbers on screen
Chapter 1. Basics
10 minutes
Video
Python
3 questions
Programming means giving a computer precise instructions. The very first instruction in Python is print().
It shows whatever is inside the parentheses on the screen.
print("Hello, world!")
# Output: Hello, world!
Text goes inside double quotes ("...") or single quotes ('...'). Numbers written without quotes
are calculated:
print(2 + 3) # Output: 5
print("2 + 3") # Output: 2 + 3
If you pass several values separated by commas, print shows them separated by spaces:
print("Group:", "25-407", "year:", 2)
# Output: Group: 25-407 year: 2
💡 Everything after
#is a comment. Python ignores it — it is for you.
Common mistakes
Print("hi")— Python is case-sensitive. Correct:print.print("hi)— the quote is not closed →SyntaxError.print hi— no parentheses or quotes →SyntaxError.
Video lesson
Practice Python
Print two lines exactly like this:
Salom, O'zing Organ!
Men Python o'rganyapman
Draw a triangle of stars with print():
*
**
***
🧩 Extra challenge
Use one print() to show the result of 7 * 6 — let Python calculate it, no quotes.
🧩 Extra challenge
input() data
Write code and press "Run". Loading Python takes a few seconds the first time.
Show solution
print("Salom, O'zing Organ!")
print("Men Python o'rganyapman")
Show solution
print("*")
print("**")
print("***")
Show solution
print(7 * 6)