Introduction

Python Modules

Python Expression

  1. 2 * 5
  2. 14 + 8
  3. 6 == 7 => false (binary Boolean expressions)

Variables

  • Variables are nothing but reserved memory locations to store values. This means that when you create a variable you reserve some space in memory. Python variables do not need explicit declaration to reserve memory space. The declaration happens automatically when you assign a value to a variable, for example:
    1. s="Hello World";
  • Variables declared are case-sensitive, for example:
    1. s="Hello Friends";
    2. S="Hello World";
    This will initialize two different variables named “s” and “S” and assign the values ‘Hello Friends’ and ‘Hello World’ to the variable ‘s’ and ‘S’

Operations

  • Python is perfectly suited to do basic calculations. Apart from addition, subtraction, multiplication and division, there is also support for more advanced operations such as:
  • Exponentiation: **. This operator raises the number to its left to the power of the number to its right. For example, 4**2 will give 16.
  • Modulo: %. This operator returns the remainder of the division of the number to the left by the number on its right. For example, 18 % 7 equals 4.

Summary

In this blog, we learned about some important points of Python Programming language to remember.