Welcome to the journey of learning Python! Before diving into coding, we'll first ensure you have Python installed on your computer. Here’s a straightforward guide to set up Python on your system.


Step 1: Install Python

Download Python

  1. Visit the Official Website: Go to python.org.
  2. Access the Downloads Section: On the homepage, locate the "Downloads" section and click the "Download Python" button.

Choose Your Version

You’ll be redirected to a page where you can select the version of Python you wish to download. It's recommended to download Python 3. Choose the appropriate version for your operating system (Windows, macOS, or Linux).


Add Python to PATH (Optional)

If you're using Windows, you may see an option to add Python to your system's PATH environment variable. This option makes it easier to run Python from the command line. If you're unsure, it's generally safe to select this option.


Install Python

Click the "Install Now" button to begin the installation process. The installer will copy the necessary files to your computer.


Verify the Installation

Once the installation is complete, you can verify it by opening the command prompt (on Windows) or terminal (on macOS or Linux). Type the following command:

python --version

This should display the version of Python you installed.


Step 2: Create and Run Your First Python Program

Once Python is installed, let’s write and execute your first program:

  1. Open a Text Editor: Use any text editor (e.g., Notepad on Windows, TextEdit on macOS, or a code editor like VS Code or PyCharm).

  2. Write Your Code: Copy the following line of code and paste it into your text editor:

    print('Hello, World!')
    
  3. Save the File: Save the file with a .py extension (e.g., Hello.py).

  4. Open the Terminal: Launch your terminal or command prompt.

  5. Run the Program: Navigate to the directory where you saved the file and run the program by typing:

    >> python Hello.py
    

You should see the output:

       >> Hello, World!

Congratulations! You have successfully executed your first Python code.


Congratulations on successfully installing Python! You're now equipped to embark on your programming journey. Whether you're looking to automate tasks, analyze data, or develop web applications, Python offers a versatile and powerful platform to bring your ideas to life.


As you progress, don't hesitate to experiment with the code, explore various libraries, and engage with the Python community. Remember, practice is key to mastering any programming language. Happy coding, and welcome to the world of Python!