keyboard_arrow_down INTRODUCTION
print("Hello World !")
Hello World !
print("My name is Chandana." , ("My age is 18."))
My name is Chandana. My age is 18.
keyboard_arrow_down DATA TYPES
# Interger (int) (1 , 4 , 2 , -2 , -5 , 0)
# Float (float) (1.0 , 4.0 ,3.5 , 10.56 , 6.78)
# String (str) ("Chandana" , "33" , "4.0")
# Boolean (bool) (True , False)
# None (no value store )
type(35)
int
type(35.0)
float
type("35.0")
str
type("35")
str
type("Chandana")
str
keyboard_arrow_down VARIABLES
# Variables
name = "Chandana"
https://colab.research.google.com/drive/1K3YrDvXE34-nLUm4aFULCV4sg-StVrtf#scrollTo=z4yaRWhm87L0&printMode=true 1/24
,4/9/26, 4:55 PM chandana notes - Colab
print(name)
Chandana
print("my name is :" , name)
my name is : Chandana
age = 18
print(age)
print("My age is :" , age)
18
My age is : 18
a = 25
b = 25
sum = a + b
print (sum)
50
keyboard_arrow_down INPUT
#Input in python
print("Hi!")
name = input()
print("My name is :" , name)
name1 = input ("Enter your name :")
print("What is your name ?")
print("nice to meet you" , name)
age = input("Enter your age :")
print("My age is :" , age)
Hi!
chandana
My name is : chandana
Enter your name :raj
What is your name ?
nice to meet you chandana
Enter your age :18
My age is : 18
keyboard_arrow_down TYPES OF OPERATORS
# Arithmetic Operators
# PEMDAS RULE
# P - Parentheses ()
# E - Exponent (**)
https://colab.research.google.com/drive/1K3YrDvXE34-nLUm4aFULCV4sg-StVrtf#scrollTo=z4yaRWhm87L0&printMode=true 2/24
, 4/9/26, 4:55 PM chandana notes - Colab
# M - Multiplication ( * )
# D - Division
# True divison ( / ) (gives float)
# Floor divsison ( // ) (gives integer)
# Module ( % ) (gives remainder)
# A - Addition (+)
# S - Subtraction (-)
print(22**5)
print(2**2)
5153632
4
print(33*2)
print(41*10)
print(9*7)
66
410
63
print(45/9)
print(10//5)
print(77//3)
5.0
2
25
print(45667+456)
print(10567+6738)
46123
17305
print(674839-2738)
print(34567800-1247988)
672101
33319812
#mix of all examples
print (3**4 + 74839 ) / ( 4 * 25 - 10 )
https://colab.research.google.com/drive/1K3YrDvXE34-nLUm4aFULCV4sg-StVrtf#scrollTo=z4yaRWhm87L0&printMode=true 3/24