Hello, computer!
Your first command to a computer: print
A computer is very fast, but it doesn't do anything by itself. It only follows commands. Writing commands is programming. We write in Python. Python is the name of a snake 🐍, but it doesn't bite!
Your first command
print means "write on the screen". We put the words we want to write inside quotes:
print("Hello, computer!")
print("I'm learning to code 🚀")
# Output: Hello, computer!
# Output: I'm learning to code 🚀
The computer prints the words exactly as you wrote them — write a mistake and it prints the mistake 😄
Computers love maths
If we write numbers without quotes, the computer calculates them:
print(2 + 3)
print(10 - 4)
print(6 * 7)
print("2 + 3")
# Output: 5
# Output: 6
# Output: 42
# Output: 2 + 3
See? The last one is in quotes — the computer didn't calculate it, it just wrote it as words.
| Sign | Meaning |
|---|---|
+ |
add |
- |
subtract |
* |
multiply (instead of ×) |
/ |
divide (instead of ÷) |
💡 Tip: press the "Run" button and see the result. If there's an error — don't be scared! Programmers make mistakes every day. Check your brackets and quotes.
Practice Python
Make the computer talk about you — write 3 lines:
Salom! Mening ismim Ali.
Men 10 yoshdaman.
Men futbolni yaxshi ko'raman ⚽
input() data
Show solution
print("Salom! Mening ismim Ali.")
print("Men 10 yoshdaman.")
print("Men futbolni yaxshi ko'raman ⚽")