what is python? uses of python and codings using it

darshinisurya515 28 views 19 slides Sep 29, 2024
Slide 1
Slide 1 of 19
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19

About This Presentation

if you want to know more about python just click here


Slide Content

Python
cdl

What is python?
Python is a high-level, general-purpose programming language
known for its readability and versatility. It's widely used in various
fields
Page 3

Adding 2 numbers

Adding 2 numbers
A=56
B=65
C=A+B
print(C)
so the output will be :
121

In the previous slide we saw how to add numbers but that
goes to all operations , in python we have symbol that we all
should know
for subtraction it is (-)
for addition it is (+)
for multiplication its (*)
for division it is (/)
Arithmetic
operations

String
programe
python

A “Wonderfull”
print(a[5]
O/P:
R
0
1
2
3
4

a= “Python”
print(a[2:5]
o/p:
thon
String Slicing

Fun fact :
did you know that ‘hello’ and” is the same::
(well you might know because we learned in class)

MUltiplier
MUltiplier
MUltiplier
string
string
string
text= ‘python’
multiplier=4
result=text*multiplier
print(result)
o/p:
pythonpythonpythonpython

python
conditional statements

<if statement block>
if perecetage>33:
print (“pass”)
else :
print(“fail”)
IF CONDITIONIF CONDITION

if percentage > 90:
print(“outstanding”)
elif(percentage>80):
print(“excellent”)
elif (percentage >70):
print(“very good”)
elif percentage >60):
print(“good”)
elif(percentage>33
print(“pass”)
else:
print(“fail”)
ANOTHER EXAMPLEANOTHER EXAMPLE

MAYBE YOU’LL
SEE A PYTHON
TODAY
WITH RELATIONAL
OPERATORS
WITH RELATIONAL
OPERATORS

m =25m =25
n=25n=25
if m > n :if m > n :
print(“m is greater than n”)print(“m is greater than n”)
if m == nif m == n
print(“m is equal to n “)print(“m is equal to n “)
if m<nif m<n
print(“ m is smaller than n “)print(“ m is smaller than n “)
start!
pyton codings

go idle now!!!!!!!
loopinglooping

looping
Syntax:
for in range(5)
print(i)
o/p
0
1
2
3
4

a=0
whole<5:
print(a)
a+=1
O/P:
0
1
2
3
4
exampleexample
22

ThankThank
YouYou