Python Basics Programs

Python is an Object Oriented programming language.

How to print

print("Amogh")

print("Manaswi

Printing Variables

Ammu=123

Manu=ABC

print(Ammu)

print(Manu)

Operators

a = 2
b = 3

print(a+b)
print(a-b)
print(a*b)
print(a/b)

Loops

Loops:

  1. While Loop
  2. For Loop

Statements

Statements:

  1. If Statement
  2. Else Statement
  3. Elif Statement

Functions

Functions:

  1. Lambda Function

Datatypes

Datatypes:

  1. Boolean
  2. List
  3. Tuple
  4. Set
  5. Dictionary
  6. Complex
  7. integer
  8. float