what is python? uses of python and codings using it
darshinisurya515
28 views
19 slides
Sep 29, 2024
Slide 1 of 19
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
About This Presentation
if you want to know more about python just click here
Size: 4.03 MB
Language: en
Added: Sep 29, 2024
Slides: 19 pages
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)
<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