DevOps, Day - 13

DevOps, Day - 13

Basics of Python

  1. what is Python?
    Python is a type of computer language that people use to tell computers what to do. It's easy to learn and people use it for many things like making websites, analyzing data, and creating intelligent systems. Lots of people like to use it because it has many tools that make things easier. It can work on different types of computers and it's free.

  2. How to install Python?

    • Go to the official Python website at python.org.

    • Click on Downloads

    • Select the appropriate installer for your operating system

    • Download the installer to your computer.

    • Run the installer and follow the on-screen instructions to install Python on your computer.

Tasks:

  1. Install Python in your respective OS, and check the version
    step 1: update your system using the command

    step 2: Now install Python by using the below command

    step 3: To check the version, use the command

  2. Data types in Python
    In simple words, a data type is a way of categorizing or classifying the type of data or information that a computer program is dealing with. It helps the program know how to store and handle the data, and what operations can be performed on it.

    To check what is the data type of the variable used, we can simply write: your_variable=100 type(your_variable)

    • Integer (int): Used for whole numbers.

    • Float: Used for decimal numbers.

    • Boolean (bool): Used for True/False values.

    • String (str): Used for text and characters.

    • List: Used for collections of values that can be of different types.

    • Tuple: Similar to a list, but immutable

    • Dictionary: Used for collections of key-value pairs

    • Set: Used for collections of unique values

Thank you so much for reading.

Follow me on LinkedIn to see interesting posts like this : )

Linkedin

Β