Download Python from python.org and install it. On Windows, tick "Add Python to PATH".
Check the installation in a terminal: python --version
Create a file called hello.py with your code.
Run it: python hello.py
You can also type python in a terminal to open the interactive shell and run code line by line.
💡 Key Takeaways: Python Get Started
Mastering Python Get Started helps you write clean and reliable Python code. Follow standard conventions, test edge cases, and keep logic simple. Try running the code example below and complete the exercises to build confidence.
Python Get Started Code Example
Python
import sys
print("You are running Python", sys.version.split()[0])
Free sign-in required · Google login available
Python Get Started Practice Exercises
Check what you learned in “Python Get Started”.
/ 3 solved
Fill in the blank
Run a Python file from the terminal.
hello.py
✓ Correct!Not quite. Try again.
Multiple choice
Which file extension do Python files use?
✓ Correct!Not quite. Try again.
Code challenge
Print the result of 7 + 5.
Write the code in the live editor. Your answer is checked automatically.