Learn Python Get Started
Python Install
1: Download Python
- Go to the official Python website
- Download the latest version for your operating system (Windows, macOS, or Linux).
2: Install Python
- Run the installer and follow the instructions
- Make sure to check the box that says "Add Python to PATH" during installation on Windows.
Step 2: Verify the Installation
1: Open a Terminal or Command Prompt:
- On Windows, search for "cmd" or "Command Prompt".
- On macOS or Linux, open the Terminal.
2: Check Python Version
- Type python --version or python3 --version and press Enter.
- You should see the installed version of Python.
Step 3: Write Your First Python Program
1: Open a Text Editor:
- You can use any text editor like Notepad, VS Code, Sublime Text, or PyCharm.
2: Write Python Code:
- Create a new file and save it with a .py extension, for example, hello.py.
- Type the following code into the file:
print("Hello, World!")
3: Run Your Python Program:
- Open a terminal or command prompt.
- Navigate to the directory where your hello.py file is saved.
- Type python hello.py or python3 hello.py and press Enter.
- You should see Hello, World! printed on the screen.
Congratulations, you have written and executed your first Python program.