UpdateGadh

UPDATEGADH.COM

Day 1:Install Python and Set Up the Environment

Day 1: Introduction to Python – Install Python and Set Up the Environment

YouTube player

Welcome to Day 1 of our 45-day Python course roadmap! Today, we will embark on an exciting journey into the world of Python programming. Our goal is to get Python up and running on your computer, ensuring you have everything you need to start coding. By the end of this post, you’ll have Python installed and your development environment set up, ready to dive into writing your first lines of code.

Complete Video Coming soon . . .

Why Python?

Python is a versatile, high-level programming language that is widely used in various fields such as web development, data science, artificial intelligence, automation, and more.

Check Out New Project :- https://www.youtube.com/@Decodeit2

Step 1: Installing Python

Downloading Python

  1. Go to the Official Python Website
  • Open your web browser and navigate to python.org.
  1. Download the Latest Version
  • Click on the “Downloads” tab. Python’s website automatically detects your operating system and suggests the appropriate installer. As of now, the latest stable version is Python 3.x.
  1. Run the Installer
  • Before clicking “Install Now,” check the box labeled “Add Python to PATH.” This step is important because it enables you to launch Python from any command prompt or terminal window.
  1. Verify the Installation

Start the terminal (Mac/Linux) or command prompt (Windows) and enter the following command:

python --version

You should see a message displaying the version of Python you just installed.

Step 2: Setting Up Your Development Environment

Now that Python has been installed, let’s create a development environment for writing and running Python code efficiently. While you can use any text editor or IDE (Integrated Development Environment), we recommend beginning with Visual Studio Code (VS Code) because of its powerful features and extensions.

Installing Visual Studio Code

  1. Download VS Code
  1. Run the Installer
  • Follow the steps to install VS Code on your computer. During installation, select the options to add VS Code to your system PATH and associate VS Code with supported file types.
  1. Launch VS Code

Installing Python Extension for VS Code

  1. Open Extensions View
  • Click on the Extensions icon in the Activity Bar on the side of the window or press Ctrl+Shift+X or (Cmd+Shift+X )on Mac.
  1. Search for Python
  • In the search bar, type “Python” and install the official Python extension provided by Microsoft.
  1. Verify Installation
  • After installation, you should see a Python logo in the status bar at the bottom. This extension provides rich support for Python, including IntelliSense (code completion), linting, debugging, and more.

Check 100+ JAVA Spring Boot Projects with Source Code

Step 3: Writing Your First Python Program

With Python installed and VS Code set up, it’s time to write your first Python program!

  1. Create a New File
  • In VS Code, go to File > New File or press Ctrl+N (Cmd+N on Mac).
  1. Save the File
  • Save the file with a .py extension, for example, hello.py.
  1. Write the Code
  • Type the following code into your new file:
python print("Hello, World!")
  1. Run the Program
  • To run your Python program, open the terminal in VS Code by going to View > Terminal or pressing Ctrl+`` (Cmd+“ on Mac). In the terminal, type:
python hello.py
  • You should see the output:
    Hello, World!

Conclusion

Congratulations! You’ve successfully installed Python, set up your development environment, and written your first Python program. This foundational setup is crucial as you continue your journey into Python programming. In the coming days, we’ll dive deeper into Python syntax, data types, and more advanced concepts. Stay tuned and keep coding!


install python
how to install python
install python mac
install python windows
brew install python
how to install python on mac
install python on mac
pip install python
install python ubuntu

Next Up: Day 2-3: Python Syntax and Basic Commands