2. Variables and data types in python
INTEGER – FLOAT – STRING
myint = 24
myfloat = 24.0 OR myfloat = float(24)
mystring = ‘Jayati‘ OR mystring = “Jayati“
3. Addition of Numbers and of Strings
Five = 5
Seven = 7
Twelve = Five + Seven
J = “Jayati“
V = “Vijaywargiya“
JV = J + " " + V
4. List in python
Similar to array we have list in
python
mylist = []
mylist.append(10)
mylist.append(20)
print(mylist[0])
print(mylist[1])
print(mylist)
Output –
10
20
[10 , 20]
5. Printing a variable
second_name = Vijaywargiya
print("The second of Jayati is %s" % second_name)
H.W.
Find out the notations used for integer and float ??
7. Operators in python
1. Conditional op.
x = 2
print(x == 2)
Output – True
2. Boolean op. – and / or
name = "Joyati“
age = 24
if name == "Jayati" and age == 23:
print(“Hii Jayati Vijaywargiya.")
if name == "Jayati" or name == “Pallavi":
print(“Hii Pallo")
8. in , is and not operator
if name in ["Jayati", “Pallavi"]:
print(x is y) – give Boolean output
print(not False) – give Boolean output
9. Syntax of For, while loop and Braeak and
Continue
for x in range(5):
for x in range(3, 6):
for x in range(3, 8, 2):
primes = [2, 3, 5, 7]
for prime in primes:
count = 0
while count < 5:
count += 1
count = 0
while True:
count += 1
if count >= 5:
break
• for x in range(10):
if x % 2 == 0:
continue
print(x)
11. Numpy
What is numpy ???
NumPy is a python library used for working
with arrays.
NumPy stands for Numerical Python.
It has lot of functionalities which we can use
18. A Sincere THANKS……
To Ramiya Mam who taught me this subject
N To all my mentors … my teachers……
Our favorite …
ever smiling …
BARUAOLE SIR
His last words to me…..ap hamesha bhagte q rahte hai…..
nashta kiya…..??? exam achha hoga…. all the best……….
& many more……
Who carved me to
what I am today