Day 13: Python Programming Language

DevOps Learning

What Is Python? 🐍

  • Python: Imagine Python as a friendly, versatile language that loves to chat with computers. It’s like teaching your pet snake (named Python, of course) to do cool tricks!

  • Open Source: Python is an open-source language, which means it’s like a community garden where everyone can plant flowers (code) and share their harvest.

  • General Purpose: Python isn’t picky—it can do almost anything! From math problems to building websites, Python’s got your back.

  • High Level: Think of Python as a translator between humans and computers. It speaks in a way that’s easy for us (humans) to understand.

  • Object-Oriented: Python thinks in terms of objects—like Lego bricks. You can build anything by snapping these bricks together.

Python’s Magic Ingredients: 🪄

  1. Guido van Rossum:

    • Guido is Python’s creator. Imagine him as the wizard who brewed the Python potion in his magical cauldron.

    • He wanted a language that’s simple, readable, and fun. Voilà! Python was born.

  2. Libraries and Frameworks:

    • Python comes with a treasure chest of libraries and frameworks:

      • Django: A web framework for building powerful websites.

      • TensorFlow: Like a crystal ball for machine learning and AI.

      • Flask: A lightweight web framework—perfect for small projects.

      • Pandas: Your data wizard for handling tables and spreadsheets.

      • Keras: A magical spellbook for deep learning.

How to Summon Python (Install It): 🔮

  1. Windows, macOS, or Linux:

    • Imagine Python as a friendly ghost that can haunt any system.

    • Visit the Python website and download the installer for your system.

    • Run the installer, and Python will settle into your computer like a cozy pet.

  2. Test the Magic:

    • Open your terminal and type:

        python --version
      
    • If it responds with a version number (e.g., “Python 3.9.2”), congrats! Python is now your trusty sidekick.

  3. Write some code :)

    • Use a code editor of your choice to write Python code.

    • Save your code with a .py extension (e.g., myProgram.py).

  4. Run Your code:

    • Back in the terminal, type:

        python3 myProgram.py
      
    • Watch your Python pet execute the magic!

Thank you for reading😉.