Module 1 — Installation of Anaconda and Python Operators

A.I Hub
8 min readJul 27, 2023

--

In this step by step guide, we will walk you through the installation of anaconda distribution and along with that we also covering python different types of operators that is necessary for complex and critical programming paradigm.

Installation of Anaconda

  • Go to the google and type there (https://www.anaconda.com), once you searched, it will open anaconda official website, where it shows two installer packages one for prompt and another one for graphical installer, you can download graphical installer by clicking on “Download” button.
  • Once, your downloading is completed, double click on the installation setup to launch the welcome screen and click on “Next” to proceed further.
  • Read the license agreement and click on “I Agree” button to move ahead.
  • Select the installation type and click “Next” button to continue the process.
  • Select your repository/directory, where you want to store anaconda graphical installer setup by clicking on “Browse” button. If not click on “Next” button to proceed ahead.
  • If you want to customize anaconda than mark your desired advanced options, but in our scenario we tick on second check box and click on “Install” button.
  • Anaconda installation in your system is ready, once it installed click on “Finish” to launch the anaconda distribution.

Python Operators

  • Arithmetic Operator
  • Logical Operator
  • Bitwise Operator
  • Membership Operator
  • Identity Operator

Introduction to Operator In Python

Python operators are symbols or special characters used to perform operations on variables and values. They allows you to manipulate data, make comparisons and perform calculations in your python programs.

Arithmetic Operator

Arithmetic operators are used to perform mathematical calculations.

They include:

  • addition(+) — Add two operands.
  • subtraction (-) — subtracts the second operands from the first.
  • multiplication (*) — multiplication two operands.
  • division (/) — divide the operands by the second.
  • modulo(%) — returns the remainder of the division.
  • Floor division(//) — when you divide the two operands, its answer in decimal, if you want to traverse your decimal result into whole number than you will use floor division to reciprocal the result of two numbers.

Assignment Operator

Assignment operators are used to assign values to the variables and it is represent by equal to sign.

They include:

  • Equal to (=) — It assign the right-hand side values to the operand that is present on the left-hand side.
  • Plus Assignment (+=) — Add right side operand with left side operand and then assign to left operand.
  • Minus Assignment(-=) — It subtracts the right operand from the left operand and assigns the result to the left operand.
  • Division Assignment (/=) — It will divide the left-hand side operand by the right-hand side operand and after that, assign the result to the left-hand operand.
  • Multiplication Assignment (%=) It will multiply the left-hand side operand by the right-hand side operand and after that, assign the result to the left-hand operand.

Comparison Operator

Comparison operators are used to compare values and return a boolean result (True / False).

They include:

  • Equal (==) — The equal to operator returns True if the values on either side of the operator are equal.
  • Not equal (!=) — It returns True if the values on either side of the operator are unequal.
  • Greater than (>) — This operator checks if the value on the left side is greater than the value on the right side. It returns True if the condition is satisfied otherwise returns False.
  • Less than (<) — This operator compares the values present on either side. If the value present on the left side is smaller than the value on the right side, it returns True otherwise it returns False.
  • Greater than or equal to (>=) — This operator only returns True if the value on the left side is greater or equal to the value on the right side.
  • Less than or equal to (<=) — This operator returns True only if the value on the left is either less than or equal to that on the right of the operator.

Logical Operator

Logical operators are used to combine conditional statements. These operators return a boolean value based on the evaluation of the conditions.

They include:

  • AND — It returns true if both conditions are true.
  • OR — It returns true if at least one condition is true.

Bitwise Operator

Bitwise operators perform operations on binary representations of numbers.

They include:

  • AND (&) — Bitwise AND operator Returns 1 if both the bits are 1 else 0.
  • OR (|) — Bitwise or operator Returns 1 if either of the bit is 1 else 0.
  • XOR (^) — It Returns 1 if one of the bits is 1 and the other is 0 else returns false.
  • NOT (~) — It returns one’s complement of the number.

Shift Operators

Shift operators are used to shift the bits of a number left or right there by multiplying or dividing the number by two respectively. They can be used when we have to multiply or divide a number by two.

  • LEFT Shift (<<) — Shifts the bits of the number to the left and fills 0 on voids right as a result. Similar effect as of multiplying the number with some power of two.
  • RIGHT Shift (>>) — Shifts the bits of the number to the right and fills 0 on voids left, fills 1 in the case of a negative number as a result. Similar effect as of dividing the number with some power of two.

Membership Operator

Membership operator are used to test if a value exist in a sequence or a collection.

They include:

in — The ‘‘in’’ operator is used to check if a character, substring, element exists in a sequence or not. Evaluate True if it finds the specified element in a sequence otherwise False.

  • not — The “not” operator evaluates true if it does not finds a variable in the specified sequence and false otherwise.

Identity Operator

Identity operator are used to compare the identity of two objects. These operators return true if the operands are the same object or false otherwise.

They include:

  • is — It evaluates True if the variables on either side of the operator point to the same object and false otherwise.
  • is not — It evaluates True if both variables are not the same object.

Conclusion:

Python operators are essential for performing various operations in python programs. In this article, we have explored the different types of operators available in python, including arithmetic, assignment, comparison, logical, bitwise, membership and identity operators. Understanding and effectively using these operators will greatly enhance your ability to manipulate and analyze data in python.

--

--

A.I Hub
A.I Hub

Written by A.I Hub

We writes about Data Science | Software Development | Machine Learning | Artificial Intelligence | Ethical Hacking and much more. Unleash your potential with us

No responses yet