First Program in the Terminal
Commands that run a simple script. Run them line by line.
2026-10-19
Steps
- 1Check Python
The command shows the version. If it is not installed, get Python from the official website.
- 2Create a file
Save one line of code in a file named hello.py.
- 3Run it
The command runs the file and prints the output.
What it looks like
Step 1$python3 --version
›Python 3.12.3
Step 2$echo 'print("Привіт!")' > hello.py
Step 3$python3 hello.py
›Привіт!
AI can make mistakes. Always check the answers: the responsibility lies with the person, not the computer or artificial intelligence.
