Python Get Started

Install Python and run your first file.

✍️ 3 exercises + code challenge in this lesson

To run Python on your own computer:

  1. Download Python from python.org and install it. On Windows, tick "Add Python to PATH".
  2. Check the installation in a terminal: python --version
  3. Create a file called hello.py with your code.
  4. 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.

Free sign-in required · Google login available

to save your exercise progress.
Finished this lesson?
Mark it complete to track your progress.

Stuck on something?

Ask the community in the CodesInTech forum.

Need a developer?

Learning on your own is great — and when you need professional help, our team builds custom software, websites and mobile apps for clients worldwide.

Explore Our Services