尊敬的 微信汇率:1円 ≈ 0.046239 元 支付宝汇率:1円 ≈ 0.04633元 [退出登录]
SlideShare a Scribd company logo
PYTHON PROGRAMMING
ADDITION OF TWO NUMBERS
Algorithm
1. START
2. READ A,B
3. LET SUM = A + B
4. PRINT SUM
5. STOP
START
Flow chart
READ A,B
LET SUM = A + B
PRINT SUM
STOP
Python program
Output
# Sum of two numbers
a=input ('Enter first number')
b=input ('Enter second number')
sum=a+b
print ('Sum of given numbers =',sum)
Enter first number10
Enter second number8
('Sum of given numbers =', 18)
SUBSTRACTION OF TWO NUMBERS
Algorithm
1. START
2. READ A, B
3. LET DIFF = A - B
4. PRINT DIFF
5. STOP
START
Flow chart
READ A,B
LET DIFF = A - B
PRINT DIFF
STOP
Python program
Output
# Difference between two numbers
a=input ('Enter first number')
b=input ('Enter second number')
diff=a-b
print (‘Difference of given numbers =‘,diff)
Enter first number10
Enter second number5
(‘Difference of given numbers =', 5)
AVERAGE OF THREE NUMBERS
Algorithm
1. START
2. READ A, B, C
3. LET AVG = (A+B+C) / 3
4. PRINT AVG
5. STOP
START
Flow chart
READ A,B, C
LET AVG = (A+B+C) / 3
PRINT AVG
STOP
Python program
Output
# Average of three numbers
a=input ('Enter first number')
b=input ('Enter second number')
C=input (‘Enter third number’)
avg=(a+b+c)/3
print (‘Average of three numbers =’,avg)
Enter first number10
Enter second number5
Enter third number15
(‘Average of three numbers =',10)
VOLUME OF CYLINDER
Algorithm
1. START
2. READ r, h
3. LET VOL = 3.14*r*r*h
4. PRINT VOL
5. STOP
START
Flow chart
READ r, h
LET VOL = 3.14*r*r*h
PRINT VOL
STOP
Python program
Output
# Volume of cylinder
r=input ('Enter radius')
h=input ('Enter height')
volume = 3.14*r*r*h
print (‘Volume of cylinder=’,volume)
Enter radius5
Enter height10
('Volume of cylinder =', 785.0)
VOLUME OF CUBE
Algorithm
1. START
2. READ a
3. LET VOL = a*a*a
4. PRINT VOL
5. STOP
START
Flow chart
READ a
LET VOL = a*a*a
PRINT VOL
STOP
Python program
Output
# Volume of cube
a=input ('Enter one side of cube')
volume = a*a*a
print (‘Volume of cube=’,volume)
Enter one side of cube5
('Volume of cube =', 125.0)
CONVERSION OF CELSIUS TO FAHRENHEIT
Algorithm
1. START
2. READ C
3. LET F = (C*9/5) + 32
4. PRINT F
5. STOP
START
Flow chart
READ C
LET F = (C*9/5) + 32
PRINT F
STOP
Python program
Output
# Convert Celsius to Fahrenheit
c=input ('Enter heat in degree Celsius')
f=(c*9/5)+32
print (‘Heat in Fahrenheit scale =’,f)
Enter heat in degree Celsius37
(‘Heat in Fahrenheit scale =’,98)
CONVERSION OF FAHRENHEIT TO CELSIUS
Algorithm
1. START
2. READ F
3. LET C = (F – 32)*5/9
4. PRINT C
5. STOP
START
Flow chart
READ F
LET C = (F – 32)*5/9
PRINT C
STOP
Python program
Output
# Convert Fahrenheit to Celsius
f=input ('Enter heat in Fahrenheit')
c=(f-32)*5/9
print (‘Heat in Celsius scale =’,c)
Enter heat in Fahrenheit98
(‘Heat in Celsius scale =’,37)
LARGEST OF THREE NUMBERS
Algorithm
1. START
2. READ A, B, C
3. IF (A>B):
IF (A>C):
LARGEST=A
ELSE:
LARGEST=C
ELSE:
IF (B>C):
LARGEST=B
ELSE :
LARGEST=C
4. PRINT LARGEST
5. STOP
START
Flow chart
READ A, B, C
LARGEST = C
PRINT LARGEST
STOP
IF (A>B)
IF (A>C) IF (B>C)
LARGEST = A LARGEST = B
NOYES
YES
YES
NONO
Python program
Output
# Largest of three numbers
a=input (‘Enter first number’)
b=input (‘Enter second number’)
c=input (‘Enter third number’)
if (a>b):
if (a>c):
largest=a
else:
largest=b
else:
if (b>c):
largest=b
else:
largest=c
print ('Largest of three numbers is',largest)
Enter first number 5
Enter second number 6
Enter third number 88
('Largest of three numbers is', 88)
CHARACTER NAME OF THE DAY
Algorithm
1. START
2. READ N
3. IF (N==1): PRINT SUNDAY
ELIF (N==2): PRINT MONDAY
ELIF (N==3): PRINT TUESDAY
ELIF (N==4): PRINT WEDNESDAY
ELIF (N==5): PRINT THURSDAY
ELIF (N==6): PRINT FRIDAY
ELIF (N==7): PRINT SATURDAY
ELSE: PRINT INVALID DAY NUMBER
4. STOP
START
Flow chart
READ N
IF (N==1)
NOYES
IF (N==2)
IF (N==3)
IF (N==4)
IF (N==5)
IF (N==6)
IF
PRINT
SUNDAY
PRINT
MONDAY
PRINT
TUESDAY
PRINT
WEDNESDAY
PRINT
THURSDAY
PRINT
FRIDAY
PRINT
SATURDAY
CHARACTER NAME OF THE DAY
Algorithm
1. START
2. READ N
3. IF (N==1): PRINT SUNDAY
ELIF (N==2): PRINT MONDAY
ELIF (N==3): PRINT TUESDAY
ELIF (N==4): PRINT WEDNESDAY
ELIF (N==5): PRINT THURSDAY
ELIF (N==6): PRINT FRIDAY
ELIF (N==7): PRINT SATURDAY
ELSE: PRINT INVALID DAY NUMBER
4. STOP
Flow chart
NO
NO
NO
NO
NO
NO
YES
YES
YES
YES
YES
YES
Python program
Output
# Character name of the day
n=input('Enter the day number')
if (n==1):
print ('Sunday')
elif (n==2):
print ('Monday')
elif (n==3):
print ('Tuesday')
elif (n==4):
print ('Wednesday')
elif (n==5):
print ('Thursday')
elif (n==6):
print ('Friday')
elif (n==7):
print ('Saturday')
else:
print ('Not a valid day number')
Enter the day number2
Monday
ODD OR EVEN
Algorithm
1. START
2. READ N
3. IF ( N%2 == 0):
PRINT EVEN
ELSE
PRINT ODD
4. STOP
START
Flow chart
READ N
STOP
Python program
Output
# To find given number is odd or even number
n=input (‘Enter number’)
if (n%2==0):
print (‘Even number’)
else:
print (‘Odd number’)
Enter nuber5
Odd number
IF
(N%2==0
PRINT ODDPRINT EVEN
TO PRINT N NATURAL NUMBERS
Algorithm
1. START
2. READ N
3. LET i=1
4. WHILE (i <= N):
PRINT i
LET I = i+1
5. STOP
START
Flow chart
READ N
STOPPython program
Output
# To print N natural numbers
n=input (‘Enter Limit’)
i=1
While (i<=n):
print i
i = i+1
Enter Limit3
1
2
3
WHILE
(i<=n)
LET i = 1
PRINT i
LET i = i + 1
YES
NO
FACTORIAL OF A NUMBER
Algorithm
1. START
2. READ N
3. LET fact =1
4. FOR x IN RANGE (1, N+1):
fact = fact * x
5. PRINT fact
6. STOP
START
Flow chart
READ N
STOPPython program
Output
# To print factorial of a number
n=input (‘Enter number’)
fact=1
For x in range (1, n+1):
fact=fact*x
Print (‘Factorial of given number is’, fact)
Enter number5
Factorial of given number is 120
for x
in range
(1, N+1)
LET fact = 1
LET fact = fact * x
YES
NO
PRINT fact

More Related Content

What's hot

Double Hashing.pptx
Double Hashing.pptxDouble Hashing.pptx
Double Hashing.pptx
VikasNirgude2
 
Traveling salesman problem
Traveling salesman problemTraveling salesman problem
Traveling salesman problem
Jayesh Chauhan
 
Polymorphism and its types
Polymorphism and its typesPolymorphism and its types
Polymorphism and its types
Suraj Bora
 
Data Structures Using C Practical File
Data Structures Using C Practical File Data Structures Using C Practical File
Data Structures Using C Practical File
Rahul Chugh
 
Heaps
HeapsHeaps
Pf cs102 programming-8 [file handling] (1)
Pf cs102 programming-8 [file handling] (1)Pf cs102 programming-8 [file handling] (1)
Pf cs102 programming-8 [file handling] (1)
Abdullah khawar
 
Dynamic programming
Dynamic programmingDynamic programming
Dynamic programming
Amit Kumar Rathi
 
Simple Java Programs
Simple Java ProgramsSimple Java Programs
Simple Java Programs
AravindSankaran
 
Merge sort
Merge sortMerge sort
Merge sort
Vidushi Pathak
 
Basic python programs
Basic python programsBasic python programs
Basic python programs
RaginiJain21
 
Data structure lab manual
Data structure lab manualData structure lab manual
Data structure lab manual
nikshaikh786
 
Dinive conquer algorithm
Dinive conquer algorithmDinive conquer algorithm
Dinive conquer algorithm
Mohd Arif
 
Strongly Connected Components
Strongly Connected Components Strongly Connected Components
Strongly Connected Components
Md. Shafiuzzaman Hira
 
Iterarators and generators in python
Iterarators and generators in pythonIterarators and generators in python
Iterarators and generators in python
Sarfaraz Ghanta
 
String and string buffer
String and string bufferString and string buffer
String and string buffer
kamal kotecha
 
PyCharm demo
PyCharm demoPyCharm demo
PyCharm demo
T. Kim Nguyen
 
Wrapper class
Wrapper classWrapper class
Wrapper class
kamal kotecha
 
Sum of subsets problem by backtracking 
Sum of subsets problem by backtracking Sum of subsets problem by backtracking 
Sum of subsets problem by backtracking 
Hasanain Alshadoodee
 
Python unit 3 m.sc cs
Python unit 3 m.sc csPython unit 3 m.sc cs
Python unit 3 m.sc cs
KALAISELVI P
 
Python programming : List and tuples
Python programming : List and tuplesPython programming : List and tuples
Python programming : List and tuples
Emertxe Information Technologies Pvt Ltd
 

What's hot (20)

Double Hashing.pptx
Double Hashing.pptxDouble Hashing.pptx
Double Hashing.pptx
 
Traveling salesman problem
Traveling salesman problemTraveling salesman problem
Traveling salesman problem
 
Polymorphism and its types
Polymorphism and its typesPolymorphism and its types
Polymorphism and its types
 
Data Structures Using C Practical File
Data Structures Using C Practical File Data Structures Using C Practical File
Data Structures Using C Practical File
 
Heaps
HeapsHeaps
Heaps
 
Pf cs102 programming-8 [file handling] (1)
Pf cs102 programming-8 [file handling] (1)Pf cs102 programming-8 [file handling] (1)
Pf cs102 programming-8 [file handling] (1)
 
Dynamic programming
Dynamic programmingDynamic programming
Dynamic programming
 
Simple Java Programs
Simple Java ProgramsSimple Java Programs
Simple Java Programs
 
Merge sort
Merge sortMerge sort
Merge sort
 
Basic python programs
Basic python programsBasic python programs
Basic python programs
 
Data structure lab manual
Data structure lab manualData structure lab manual
Data structure lab manual
 
Dinive conquer algorithm
Dinive conquer algorithmDinive conquer algorithm
Dinive conquer algorithm
 
Strongly Connected Components
Strongly Connected Components Strongly Connected Components
Strongly Connected Components
 
Iterarators and generators in python
Iterarators and generators in pythonIterarators and generators in python
Iterarators and generators in python
 
String and string buffer
String and string bufferString and string buffer
String and string buffer
 
PyCharm demo
PyCharm demoPyCharm demo
PyCharm demo
 
Wrapper class
Wrapper classWrapper class
Wrapper class
 
Sum of subsets problem by backtracking 
Sum of subsets problem by backtracking Sum of subsets problem by backtracking 
Sum of subsets problem by backtracking 
 
Python unit 3 m.sc cs
Python unit 3 m.sc csPython unit 3 m.sc cs
Python unit 3 m.sc cs
 
Python programming : List and tuples
Python programming : List and tuplesPython programming : List and tuples
Python programming : List and tuples
 

Similar to Python programs - PPT file (Polytechnics)

PL /SQL program UNIT 5 DMS 22319
PL /SQL program UNIT 5 DMS 22319PL /SQL program UNIT 5 DMS 22319
PL /SQL program UNIT 5 DMS 22319
ARVIND SARDAR
 
140+ Basic Python Programs This resource can assist you in preparing for your...
140+ Basic Python Programs This resource can assist you in preparing for your...140+ Basic Python Programs This resource can assist you in preparing for your...
140+ Basic Python Programs This resource can assist you in preparing for your...
SulbhaGath1
 
140+ Basic Python Programs This resource can assist you in preparing for your...
140+ Basic Python Programs This resource can assist you in preparing for your...140+ Basic Python Programs This resource can assist you in preparing for your...
140+ Basic Python Programs This resource can assist you in preparing for your...
SulbhaGath1
 
140+ Basic Python Programs This resource can assist you in preparing for your...
140+ Basic Python Programs This resource can assist you in preparing for your...140+ Basic Python Programs This resource can assist you in preparing for your...
140+ Basic Python Programs This resource can assist you in preparing for your...
SulbhaGath1
 
python practicals-solution-2019-20-class-xii.pdf
python practicals-solution-2019-20-class-xii.pdfpython practicals-solution-2019-20-class-xii.pdf
python practicals-solution-2019-20-class-xii.pdf
rajatxyz
 
C-LOOP-Session-2.pptx
C-LOOP-Session-2.pptxC-LOOP-Session-2.pptx
C-LOOP-Session-2.pptx
Sarkunavathi Aribal
 
Ejer
EjerEjer
PRACTICAL FILE(COMP SC).pptx
PRACTICAL FILE(COMP SC).pptxPRACTICAL FILE(COMP SC).pptx
PRACTICAL FILE(COMP SC).pptx
AbhinavGupta257043
 
Plsql programs(encrypted)
Plsql programs(encrypted)Plsql programs(encrypted)
Plsql programs(encrypted)
Karunakar Singh Thakur
 
Chapter 1 Basic Programming (Python Programming Lecture)
Chapter 1 Basic Programming (Python Programming Lecture)Chapter 1 Basic Programming (Python Programming Lecture)
Chapter 1 Basic Programming (Python Programming Lecture)
IoT Code Lab
 
PYTHON_PROGRAM(1-34).pdf
PYTHON_PROGRAM(1-34).pdfPYTHON_PROGRAM(1-34).pdf
PYTHON_PROGRAM(1-34).pdf
Neeraj381934
 
CODING QUESTIONS.pptx
CODING QUESTIONS.pptxCODING QUESTIONS.pptx
CODING QUESTIONS.pptx
rani marri
 
C programs
C programsC programs
C programs
Minu S
 
Simple C programs
Simple C programsSimple C programs
Simple C programs
ab11cs001
 
Python programming workshop session 4
Python programming workshop session 4Python programming workshop session 4
Python programming workshop session 4
Abdul Haseeb
 
PCA-2 Programming and Solving 2nd Sem.pdf
PCA-2 Programming and Solving 2nd Sem.pdfPCA-2 Programming and Solving 2nd Sem.pdf
PCA-2 Programming and Solving 2nd Sem.pdf
Ashutoshprasad27
 
PCA-2 Programming and Solving 2nd Sem.docx
PCA-2 Programming and Solving 2nd Sem.docxPCA-2 Programming and Solving 2nd Sem.docx
PCA-2 Programming and Solving 2nd Sem.docx
Ashutoshprasad27
 
25422733 c-programming-and-data-structures-lab-manual
25422733 c-programming-and-data-structures-lab-manual25422733 c-programming-and-data-structures-lab-manual
25422733 c-programming-and-data-structures-lab-manual
kamesh dagia
 
Practical write a c program to reverse a given number
Practical write a c program to reverse a given numberPractical write a c program to reverse a given number
Practical write a c program to reverse a given number
Mainak Sasmal
 
Practical write a c program to reverse a given number
Practical write a c program to reverse a given numberPractical write a c program to reverse a given number
Practical write a c program to reverse a given number
Mainak Sasmal
 

Similar to Python programs - PPT file (Polytechnics) (20)

PL /SQL program UNIT 5 DMS 22319
PL /SQL program UNIT 5 DMS 22319PL /SQL program UNIT 5 DMS 22319
PL /SQL program UNIT 5 DMS 22319
 
140+ Basic Python Programs This resource can assist you in preparing for your...
140+ Basic Python Programs This resource can assist you in preparing for your...140+ Basic Python Programs This resource can assist you in preparing for your...
140+ Basic Python Programs This resource can assist you in preparing for your...
 
140+ Basic Python Programs This resource can assist you in preparing for your...
140+ Basic Python Programs This resource can assist you in preparing for your...140+ Basic Python Programs This resource can assist you in preparing for your...
140+ Basic Python Programs This resource can assist you in preparing for your...
 
140+ Basic Python Programs This resource can assist you in preparing for your...
140+ Basic Python Programs This resource can assist you in preparing for your...140+ Basic Python Programs This resource can assist you in preparing for your...
140+ Basic Python Programs This resource can assist you in preparing for your...
 
python practicals-solution-2019-20-class-xii.pdf
python practicals-solution-2019-20-class-xii.pdfpython practicals-solution-2019-20-class-xii.pdf
python practicals-solution-2019-20-class-xii.pdf
 
C-LOOP-Session-2.pptx
C-LOOP-Session-2.pptxC-LOOP-Session-2.pptx
C-LOOP-Session-2.pptx
 
Ejer
EjerEjer
Ejer
 
PRACTICAL FILE(COMP SC).pptx
PRACTICAL FILE(COMP SC).pptxPRACTICAL FILE(COMP SC).pptx
PRACTICAL FILE(COMP SC).pptx
 
Plsql programs(encrypted)
Plsql programs(encrypted)Plsql programs(encrypted)
Plsql programs(encrypted)
 
Chapter 1 Basic Programming (Python Programming Lecture)
Chapter 1 Basic Programming (Python Programming Lecture)Chapter 1 Basic Programming (Python Programming Lecture)
Chapter 1 Basic Programming (Python Programming Lecture)
 
PYTHON_PROGRAM(1-34).pdf
PYTHON_PROGRAM(1-34).pdfPYTHON_PROGRAM(1-34).pdf
PYTHON_PROGRAM(1-34).pdf
 
CODING QUESTIONS.pptx
CODING QUESTIONS.pptxCODING QUESTIONS.pptx
CODING QUESTIONS.pptx
 
C programs
C programsC programs
C programs
 
Simple C programs
Simple C programsSimple C programs
Simple C programs
 
Python programming workshop session 4
Python programming workshop session 4Python programming workshop session 4
Python programming workshop session 4
 
PCA-2 Programming and Solving 2nd Sem.pdf
PCA-2 Programming and Solving 2nd Sem.pdfPCA-2 Programming and Solving 2nd Sem.pdf
PCA-2 Programming and Solving 2nd Sem.pdf
 
PCA-2 Programming and Solving 2nd Sem.docx
PCA-2 Programming and Solving 2nd Sem.docxPCA-2 Programming and Solving 2nd Sem.docx
PCA-2 Programming and Solving 2nd Sem.docx
 
25422733 c-programming-and-data-structures-lab-manual
25422733 c-programming-and-data-structures-lab-manual25422733 c-programming-and-data-structures-lab-manual
25422733 c-programming-and-data-structures-lab-manual
 
Practical write a c program to reverse a given number
Practical write a c program to reverse a given numberPractical write a c program to reverse a given number
Practical write a c program to reverse a given number
 
Practical write a c program to reverse a given number
Practical write a c program to reverse a given numberPractical write a c program to reverse a given number
Practical write a c program to reverse a given number
 

More from SHAMJITH KM

Salah of the Prophet (ﷺ).pdf
Salah of the Prophet (ﷺ).pdfSalah of the Prophet (ﷺ).pdf
Salah of the Prophet (ﷺ).pdf
SHAMJITH KM
 
Construction Materials and Engineering - Module IV - Lecture Notes
Construction Materials and Engineering - Module IV - Lecture NotesConstruction Materials and Engineering - Module IV - Lecture Notes
Construction Materials and Engineering - Module IV - Lecture Notes
SHAMJITH KM
 
Construction Materials and Engineering - Module III - Lecture Notes
Construction Materials and Engineering - Module III - Lecture NotesConstruction Materials and Engineering - Module III - Lecture Notes
Construction Materials and Engineering - Module III - Lecture Notes
SHAMJITH KM
 
Construction Materials and Engineering - Module II - Lecture Notes
Construction Materials and Engineering - Module II - Lecture NotesConstruction Materials and Engineering - Module II - Lecture Notes
Construction Materials and Engineering - Module II - Lecture Notes
SHAMJITH KM
 
Construction Materials and Engineering - Module I - Lecture Notes
Construction Materials and Engineering - Module I - Lecture NotesConstruction Materials and Engineering - Module I - Lecture Notes
Construction Materials and Engineering - Module I - Lecture Notes
SHAMJITH KM
 
Computing fundamentals lab record - Polytechnics
Computing fundamentals lab record - PolytechnicsComputing fundamentals lab record - Polytechnics
Computing fundamentals lab record - Polytechnics
SHAMJITH KM
 
Concrete lab manual - Polytechnics
Concrete lab manual - PolytechnicsConcrete lab manual - Polytechnics
Concrete lab manual - Polytechnics
SHAMJITH KM
 
Concrete Technology Study Notes
Concrete Technology Study NotesConcrete Technology Study Notes
Concrete Technology Study Notes
SHAMJITH KM
 
നബി(സ)യുടെ നമസ്കാരം - രൂപവും പ്രാര്ത്ഥനകളും
നബി(സ)യുടെ നമസ്കാരം -  രൂപവും പ്രാര്ത്ഥനകളുംനബി(സ)യുടെ നമസ്കാരം -  രൂപവും പ്രാര്ത്ഥനകളും
നബി(സ)യുടെ നമസ്കാരം - രൂപവും പ്രാര്ത്ഥനകളും
SHAMJITH KM
 
Design of simple beam using staad pro - doc file
Design of simple beam using staad pro - doc fileDesign of simple beam using staad pro - doc file
Design of simple beam using staad pro - doc file
SHAMJITH KM
 
Design of simple beam using staad pro
Design of simple beam using staad proDesign of simple beam using staad pro
Design of simple beam using staad pro
SHAMJITH KM
 
Python programming Workshop SITTTR - Kalamassery
Python programming Workshop SITTTR - KalamasseryPython programming Workshop SITTTR - Kalamassery
Python programming Workshop SITTTR - Kalamassery
SHAMJITH KM
 
Analysis of simple beam using STAAD Pro (Exp No 1)
Analysis of simple beam using STAAD Pro (Exp No 1)Analysis of simple beam using STAAD Pro (Exp No 1)
Analysis of simple beam using STAAD Pro (Exp No 1)
SHAMJITH KM
 
Theory of structures I - STUDENT NOTE BOOK (Polytechnics Revision 2015)
Theory of structures I - STUDENT NOTE BOOK (Polytechnics Revision 2015)Theory of structures I - STUDENT NOTE BOOK (Polytechnics Revision 2015)
Theory of structures I - STUDENT NOTE BOOK (Polytechnics Revision 2015)
SHAMJITH KM
 
Theory of structures II - STUDENT NOTE BOOK (Polytechnics Revision 2015)
Theory of structures II - STUDENT NOTE BOOK (Polytechnics Revision 2015)Theory of structures II - STUDENT NOTE BOOK (Polytechnics Revision 2015)
Theory of structures II - STUDENT NOTE BOOK (Polytechnics Revision 2015)
SHAMJITH KM
 
CAD Lab model viva questions
CAD Lab model viva questions CAD Lab model viva questions
CAD Lab model viva questions
SHAMJITH KM
 
Brain Computer Interface (BCI) - seminar PPT
Brain Computer Interface (BCI) -  seminar PPTBrain Computer Interface (BCI) -  seminar PPT
Brain Computer Interface (BCI) - seminar PPT
SHAMJITH KM
 
Surveying - Module iii-levelling only note
Surveying - Module  iii-levelling only noteSurveying - Module  iii-levelling only note
Surveying - Module iii-levelling only note
SHAMJITH KM
 
Surveying - Module II - compass surveying
Surveying - Module  II - compass surveyingSurveying - Module  II - compass surveying
Surveying - Module II - compass surveying
SHAMJITH KM
 
Surveying - Module I - Introduction to surveying
Surveying - Module I - Introduction to surveying Surveying - Module I - Introduction to surveying
Surveying - Module I - Introduction to surveying
SHAMJITH KM
 

More from SHAMJITH KM (20)

Salah of the Prophet (ﷺ).pdf
Salah of the Prophet (ﷺ).pdfSalah of the Prophet (ﷺ).pdf
Salah of the Prophet (ﷺ).pdf
 
Construction Materials and Engineering - Module IV - Lecture Notes
Construction Materials and Engineering - Module IV - Lecture NotesConstruction Materials and Engineering - Module IV - Lecture Notes
Construction Materials and Engineering - Module IV - Lecture Notes
 
Construction Materials and Engineering - Module III - Lecture Notes
Construction Materials and Engineering - Module III - Lecture NotesConstruction Materials and Engineering - Module III - Lecture Notes
Construction Materials and Engineering - Module III - Lecture Notes
 
Construction Materials and Engineering - Module II - Lecture Notes
Construction Materials and Engineering - Module II - Lecture NotesConstruction Materials and Engineering - Module II - Lecture Notes
Construction Materials and Engineering - Module II - Lecture Notes
 
Construction Materials and Engineering - Module I - Lecture Notes
Construction Materials and Engineering - Module I - Lecture NotesConstruction Materials and Engineering - Module I - Lecture Notes
Construction Materials and Engineering - Module I - Lecture Notes
 
Computing fundamentals lab record - Polytechnics
Computing fundamentals lab record - PolytechnicsComputing fundamentals lab record - Polytechnics
Computing fundamentals lab record - Polytechnics
 
Concrete lab manual - Polytechnics
Concrete lab manual - PolytechnicsConcrete lab manual - Polytechnics
Concrete lab manual - Polytechnics
 
Concrete Technology Study Notes
Concrete Technology Study NotesConcrete Technology Study Notes
Concrete Technology Study Notes
 
നബി(സ)യുടെ നമസ്കാരം - രൂപവും പ്രാര്ത്ഥനകളും
നബി(സ)യുടെ നമസ്കാരം -  രൂപവും പ്രാര്ത്ഥനകളുംനബി(സ)യുടെ നമസ്കാരം -  രൂപവും പ്രാര്ത്ഥനകളും
നബി(സ)യുടെ നമസ്കാരം - രൂപവും പ്രാര്ത്ഥനകളും
 
Design of simple beam using staad pro - doc file
Design of simple beam using staad pro - doc fileDesign of simple beam using staad pro - doc file
Design of simple beam using staad pro - doc file
 
Design of simple beam using staad pro
Design of simple beam using staad proDesign of simple beam using staad pro
Design of simple beam using staad pro
 
Python programming Workshop SITTTR - Kalamassery
Python programming Workshop SITTTR - KalamasseryPython programming Workshop SITTTR - Kalamassery
Python programming Workshop SITTTR - Kalamassery
 
Analysis of simple beam using STAAD Pro (Exp No 1)
Analysis of simple beam using STAAD Pro (Exp No 1)Analysis of simple beam using STAAD Pro (Exp No 1)
Analysis of simple beam using STAAD Pro (Exp No 1)
 
Theory of structures I - STUDENT NOTE BOOK (Polytechnics Revision 2015)
Theory of structures I - STUDENT NOTE BOOK (Polytechnics Revision 2015)Theory of structures I - STUDENT NOTE BOOK (Polytechnics Revision 2015)
Theory of structures I - STUDENT NOTE BOOK (Polytechnics Revision 2015)
 
Theory of structures II - STUDENT NOTE BOOK (Polytechnics Revision 2015)
Theory of structures II - STUDENT NOTE BOOK (Polytechnics Revision 2015)Theory of structures II - STUDENT NOTE BOOK (Polytechnics Revision 2015)
Theory of structures II - STUDENT NOTE BOOK (Polytechnics Revision 2015)
 
CAD Lab model viva questions
CAD Lab model viva questions CAD Lab model viva questions
CAD Lab model viva questions
 
Brain Computer Interface (BCI) - seminar PPT
Brain Computer Interface (BCI) -  seminar PPTBrain Computer Interface (BCI) -  seminar PPT
Brain Computer Interface (BCI) - seminar PPT
 
Surveying - Module iii-levelling only note
Surveying - Module  iii-levelling only noteSurveying - Module  iii-levelling only note
Surveying - Module iii-levelling only note
 
Surveying - Module II - compass surveying
Surveying - Module  II - compass surveyingSurveying - Module  II - compass surveying
Surveying - Module II - compass surveying
 
Surveying - Module I - Introduction to surveying
Surveying - Module I - Introduction to surveying Surveying - Module I - Introduction to surveying
Surveying - Module I - Introduction to surveying
 

Recently uploaded

BBOC407 Module 1.pptx Biology for Engineers
BBOC407  Module 1.pptx Biology for EngineersBBOC407  Module 1.pptx Biology for Engineers
BBOC407 Module 1.pptx Biology for Engineers
sathishkumars808912
 
AN INTRODUCTION OF AI & SEARCHING TECHIQUES
AN INTRODUCTION OF AI & SEARCHING TECHIQUESAN INTRODUCTION OF AI & SEARCHING TECHIQUES
AN INTRODUCTION OF AI & SEARCHING TECHIQUES
drshikhapandey2022
 
Lateral load-resisting systems in buildings.pptx
Lateral load-resisting systems in buildings.pptxLateral load-resisting systems in buildings.pptx
Lateral load-resisting systems in buildings.pptx
DebendraDevKhanal1
 
MODULE 5 BIOLOGY FOR ENGINEERS TRENDS IN BIO ENGINEERING.pptx
MODULE 5 BIOLOGY FOR ENGINEERS TRENDS IN BIO ENGINEERING.pptxMODULE 5 BIOLOGY FOR ENGINEERS TRENDS IN BIO ENGINEERING.pptx
MODULE 5 BIOLOGY FOR ENGINEERS TRENDS IN BIO ENGINEERING.pptx
NaveenNaveen726446
 
CSP_Study - Notes (Paul McNeill) 2017.pdf
CSP_Study - Notes (Paul McNeill) 2017.pdfCSP_Study - Notes (Paul McNeill) 2017.pdf
CSP_Study - Notes (Paul McNeill) 2017.pdf
Ismail Sultan
 
comptia-security-sy0-701-exam-objectives-(5-0).pdf
comptia-security-sy0-701-exam-objectives-(5-0).pdfcomptia-security-sy0-701-exam-objectives-(5-0).pdf
comptia-security-sy0-701-exam-objectives-(5-0).pdf
foxlyon
 
🔥Photo Call Girls Lucknow 💯Call Us 🔝 6350257716 🔝💃Independent Lucknow Escorts...
🔥Photo Call Girls Lucknow 💯Call Us 🔝 6350257716 🔝💃Independent Lucknow Escorts...🔥Photo Call Girls Lucknow 💯Call Us 🔝 6350257716 🔝💃Independent Lucknow Escorts...
🔥Photo Call Girls Lucknow 💯Call Us 🔝 6350257716 🔝💃Independent Lucknow Escorts...
AK47
 
Online train ticket booking system project.pdf
Online train ticket booking system project.pdfOnline train ticket booking system project.pdf
Online train ticket booking system project.pdf
Kamal Acharya
 
🚺ANJALI MEHTA High Profile Call Girls Ahmedabad 💯Call Us 🔝 9352988975 🔝💃Top C...
🚺ANJALI MEHTA High Profile Call Girls Ahmedabad 💯Call Us 🔝 9352988975 🔝💃Top C...🚺ANJALI MEHTA High Profile Call Girls Ahmedabad 💯Call Us 🔝 9352988975 🔝💃Top C...
🚺ANJALI MEHTA High Profile Call Girls Ahmedabad 💯Call Us 🔝 9352988975 🔝💃Top C...
dulbh kashyap
 
SPICE PARK JUL2024 ( 6,866 SPICE Models )
SPICE PARK JUL2024 ( 6,866 SPICE Models )SPICE PARK JUL2024 ( 6,866 SPICE Models )
SPICE PARK JUL2024 ( 6,866 SPICE Models )
Tsuyoshi Horigome
 
🔥 Hyderabad Call Girls  👉 9352988975 👫 High Profile Call Girls Whatsapp Numbe...
🔥 Hyderabad Call Girls  👉 9352988975 👫 High Profile Call Girls Whatsapp Numbe...🔥 Hyderabad Call Girls  👉 9352988975 👫 High Profile Call Girls Whatsapp Numbe...
🔥 Hyderabad Call Girls  👉 9352988975 👫 High Profile Call Girls Whatsapp Numbe...
aarusi sexy model
 
Sri Guru Hargobind Ji - Bandi Chor Guru.pdf
Sri Guru Hargobind Ji - Bandi Chor Guru.pdfSri Guru Hargobind Ji - Bandi Chor Guru.pdf
Sri Guru Hargobind Ji - Bandi Chor Guru.pdf
Balvir Singh
 
Asymmetrical Repulsion Magnet Motor Ratio 6-7.pdf
Asymmetrical Repulsion Magnet Motor Ratio 6-7.pdfAsymmetrical Repulsion Magnet Motor Ratio 6-7.pdf
Asymmetrical Repulsion Magnet Motor Ratio 6-7.pdf
felixwold
 
❣Independent Call Girls Chennai 💯Call Us 🔝 7737669865 🔝💃Independent Chennai E...
❣Independent Call Girls Chennai 💯Call Us 🔝 7737669865 🔝💃Independent Chennai E...❣Independent Call Girls Chennai 💯Call Us 🔝 7737669865 🔝💃Independent Chennai E...
❣Independent Call Girls Chennai 💯Call Us 🔝 7737669865 🔝💃Independent Chennai E...
nainakaoornoida
 
DELTA V MES EMERSON EDUARDO RODRIGUES ENGINEER
DELTA V MES EMERSON EDUARDO RODRIGUES ENGINEERDELTA V MES EMERSON EDUARDO RODRIGUES ENGINEER
DELTA V MES EMERSON EDUARDO RODRIGUES ENGINEER
EMERSON EDUARDO RODRIGUES
 
Cricket management system ptoject report.pdf
Cricket management system ptoject report.pdfCricket management system ptoject report.pdf
Cricket management system ptoject report.pdf
Kamal Acharya
 
Better Builder Magazine, Issue 49 / Spring 2024
Better Builder Magazine, Issue 49 / Spring 2024Better Builder Magazine, Issue 49 / Spring 2024
Better Builder Magazine, Issue 49 / Spring 2024
Better Builder Magazine
 
My Airframe Metallic Design Capability Studies..pdf
My Airframe Metallic Design Capability Studies..pdfMy Airframe Metallic Design Capability Studies..pdf
My Airframe Metallic Design Capability Studies..pdf
Geoffrey Wardle. MSc. MSc. Snr.MAIAA
 
Cuttack Call Girls 💯Call Us 🔝 7374876321 🔝 💃 Independent Female Escort Service
Cuttack Call Girls 💯Call Us 🔝 7374876321 🔝 💃 Independent Female Escort ServiceCuttack Call Girls 💯Call Us 🔝 7374876321 🔝 💃 Independent Female Escort Service
Cuttack Call Girls 💯Call Us 🔝 7374876321 🔝 💃 Independent Female Escort Service
yakranividhrini
 
🔥LiploCk Call Girls Pune 💯Call Us 🔝 7014168258 🔝💃Independent Pune Escorts Ser...
🔥LiploCk Call Girls Pune 💯Call Us 🔝 7014168258 🔝💃Independent Pune Escorts Ser...🔥LiploCk Call Girls Pune 💯Call Us 🔝 7014168258 🔝💃Independent Pune Escorts Ser...
🔥LiploCk Call Girls Pune 💯Call Us 🔝 7014168258 🔝💃Independent Pune Escorts Ser...
adhaniomprakash
 

Recently uploaded (20)

BBOC407 Module 1.pptx Biology for Engineers
BBOC407  Module 1.pptx Biology for EngineersBBOC407  Module 1.pptx Biology for Engineers
BBOC407 Module 1.pptx Biology for Engineers
 
AN INTRODUCTION OF AI & SEARCHING TECHIQUES
AN INTRODUCTION OF AI & SEARCHING TECHIQUESAN INTRODUCTION OF AI & SEARCHING TECHIQUES
AN INTRODUCTION OF AI & SEARCHING TECHIQUES
 
Lateral load-resisting systems in buildings.pptx
Lateral load-resisting systems in buildings.pptxLateral load-resisting systems in buildings.pptx
Lateral load-resisting systems in buildings.pptx
 
MODULE 5 BIOLOGY FOR ENGINEERS TRENDS IN BIO ENGINEERING.pptx
MODULE 5 BIOLOGY FOR ENGINEERS TRENDS IN BIO ENGINEERING.pptxMODULE 5 BIOLOGY FOR ENGINEERS TRENDS IN BIO ENGINEERING.pptx
MODULE 5 BIOLOGY FOR ENGINEERS TRENDS IN BIO ENGINEERING.pptx
 
CSP_Study - Notes (Paul McNeill) 2017.pdf
CSP_Study - Notes (Paul McNeill) 2017.pdfCSP_Study - Notes (Paul McNeill) 2017.pdf
CSP_Study - Notes (Paul McNeill) 2017.pdf
 
comptia-security-sy0-701-exam-objectives-(5-0).pdf
comptia-security-sy0-701-exam-objectives-(5-0).pdfcomptia-security-sy0-701-exam-objectives-(5-0).pdf
comptia-security-sy0-701-exam-objectives-(5-0).pdf
 
🔥Photo Call Girls Lucknow 💯Call Us 🔝 6350257716 🔝💃Independent Lucknow Escorts...
🔥Photo Call Girls Lucknow 💯Call Us 🔝 6350257716 🔝💃Independent Lucknow Escorts...🔥Photo Call Girls Lucknow 💯Call Us 🔝 6350257716 🔝💃Independent Lucknow Escorts...
🔥Photo Call Girls Lucknow 💯Call Us 🔝 6350257716 🔝💃Independent Lucknow Escorts...
 
Online train ticket booking system project.pdf
Online train ticket booking system project.pdfOnline train ticket booking system project.pdf
Online train ticket booking system project.pdf
 
🚺ANJALI MEHTA High Profile Call Girls Ahmedabad 💯Call Us 🔝 9352988975 🔝💃Top C...
🚺ANJALI MEHTA High Profile Call Girls Ahmedabad 💯Call Us 🔝 9352988975 🔝💃Top C...🚺ANJALI MEHTA High Profile Call Girls Ahmedabad 💯Call Us 🔝 9352988975 🔝💃Top C...
🚺ANJALI MEHTA High Profile Call Girls Ahmedabad 💯Call Us 🔝 9352988975 🔝💃Top C...
 
SPICE PARK JUL2024 ( 6,866 SPICE Models )
SPICE PARK JUL2024 ( 6,866 SPICE Models )SPICE PARK JUL2024 ( 6,866 SPICE Models )
SPICE PARK JUL2024 ( 6,866 SPICE Models )
 
🔥 Hyderabad Call Girls  👉 9352988975 👫 High Profile Call Girls Whatsapp Numbe...
🔥 Hyderabad Call Girls  👉 9352988975 👫 High Profile Call Girls Whatsapp Numbe...🔥 Hyderabad Call Girls  👉 9352988975 👫 High Profile Call Girls Whatsapp Numbe...
🔥 Hyderabad Call Girls  👉 9352988975 👫 High Profile Call Girls Whatsapp Numbe...
 
Sri Guru Hargobind Ji - Bandi Chor Guru.pdf
Sri Guru Hargobind Ji - Bandi Chor Guru.pdfSri Guru Hargobind Ji - Bandi Chor Guru.pdf
Sri Guru Hargobind Ji - Bandi Chor Guru.pdf
 
Asymmetrical Repulsion Magnet Motor Ratio 6-7.pdf
Asymmetrical Repulsion Magnet Motor Ratio 6-7.pdfAsymmetrical Repulsion Magnet Motor Ratio 6-7.pdf
Asymmetrical Repulsion Magnet Motor Ratio 6-7.pdf
 
❣Independent Call Girls Chennai 💯Call Us 🔝 7737669865 🔝💃Independent Chennai E...
❣Independent Call Girls Chennai 💯Call Us 🔝 7737669865 🔝💃Independent Chennai E...❣Independent Call Girls Chennai 💯Call Us 🔝 7737669865 🔝💃Independent Chennai E...
❣Independent Call Girls Chennai 💯Call Us 🔝 7737669865 🔝💃Independent Chennai E...
 
DELTA V MES EMERSON EDUARDO RODRIGUES ENGINEER
DELTA V MES EMERSON EDUARDO RODRIGUES ENGINEERDELTA V MES EMERSON EDUARDO RODRIGUES ENGINEER
DELTA V MES EMERSON EDUARDO RODRIGUES ENGINEER
 
Cricket management system ptoject report.pdf
Cricket management system ptoject report.pdfCricket management system ptoject report.pdf
Cricket management system ptoject report.pdf
 
Better Builder Magazine, Issue 49 / Spring 2024
Better Builder Magazine, Issue 49 / Spring 2024Better Builder Magazine, Issue 49 / Spring 2024
Better Builder Magazine, Issue 49 / Spring 2024
 
My Airframe Metallic Design Capability Studies..pdf
My Airframe Metallic Design Capability Studies..pdfMy Airframe Metallic Design Capability Studies..pdf
My Airframe Metallic Design Capability Studies..pdf
 
Cuttack Call Girls 💯Call Us 🔝 7374876321 🔝 💃 Independent Female Escort Service
Cuttack Call Girls 💯Call Us 🔝 7374876321 🔝 💃 Independent Female Escort ServiceCuttack Call Girls 💯Call Us 🔝 7374876321 🔝 💃 Independent Female Escort Service
Cuttack Call Girls 💯Call Us 🔝 7374876321 🔝 💃 Independent Female Escort Service
 
🔥LiploCk Call Girls Pune 💯Call Us 🔝 7014168258 🔝💃Independent Pune Escorts Ser...
🔥LiploCk Call Girls Pune 💯Call Us 🔝 7014168258 🔝💃Independent Pune Escorts Ser...🔥LiploCk Call Girls Pune 💯Call Us 🔝 7014168258 🔝💃Independent Pune Escorts Ser...
🔥LiploCk Call Girls Pune 💯Call Us 🔝 7014168258 🔝💃Independent Pune Escorts Ser...
 

Python programs - PPT file (Polytechnics)

  • 2. ADDITION OF TWO NUMBERS Algorithm 1. START 2. READ A,B 3. LET SUM = A + B 4. PRINT SUM 5. STOP START Flow chart READ A,B LET SUM = A + B PRINT SUM STOP Python program Output # Sum of two numbers a=input ('Enter first number') b=input ('Enter second number') sum=a+b print ('Sum of given numbers =',sum) Enter first number10 Enter second number8 ('Sum of given numbers =', 18)
  • 3. SUBSTRACTION OF TWO NUMBERS Algorithm 1. START 2. READ A, B 3. LET DIFF = A - B 4. PRINT DIFF 5. STOP START Flow chart READ A,B LET DIFF = A - B PRINT DIFF STOP Python program Output # Difference between two numbers a=input ('Enter first number') b=input ('Enter second number') diff=a-b print (‘Difference of given numbers =‘,diff) Enter first number10 Enter second number5 (‘Difference of given numbers =', 5)
  • 4. AVERAGE OF THREE NUMBERS Algorithm 1. START 2. READ A, B, C 3. LET AVG = (A+B+C) / 3 4. PRINT AVG 5. STOP START Flow chart READ A,B, C LET AVG = (A+B+C) / 3 PRINT AVG STOP Python program Output # Average of three numbers a=input ('Enter first number') b=input ('Enter second number') C=input (‘Enter third number’) avg=(a+b+c)/3 print (‘Average of three numbers =’,avg) Enter first number10 Enter second number5 Enter third number15 (‘Average of three numbers =',10)
  • 5. VOLUME OF CYLINDER Algorithm 1. START 2. READ r, h 3. LET VOL = 3.14*r*r*h 4. PRINT VOL 5. STOP START Flow chart READ r, h LET VOL = 3.14*r*r*h PRINT VOL STOP Python program Output # Volume of cylinder r=input ('Enter radius') h=input ('Enter height') volume = 3.14*r*r*h print (‘Volume of cylinder=’,volume) Enter radius5 Enter height10 ('Volume of cylinder =', 785.0)
  • 6. VOLUME OF CUBE Algorithm 1. START 2. READ a 3. LET VOL = a*a*a 4. PRINT VOL 5. STOP START Flow chart READ a LET VOL = a*a*a PRINT VOL STOP Python program Output # Volume of cube a=input ('Enter one side of cube') volume = a*a*a print (‘Volume of cube=’,volume) Enter one side of cube5 ('Volume of cube =', 125.0)
  • 7. CONVERSION OF CELSIUS TO FAHRENHEIT Algorithm 1. START 2. READ C 3. LET F = (C*9/5) + 32 4. PRINT F 5. STOP START Flow chart READ C LET F = (C*9/5) + 32 PRINT F STOP Python program Output # Convert Celsius to Fahrenheit c=input ('Enter heat in degree Celsius') f=(c*9/5)+32 print (‘Heat in Fahrenheit scale =’,f) Enter heat in degree Celsius37 (‘Heat in Fahrenheit scale =’,98)
  • 8. CONVERSION OF FAHRENHEIT TO CELSIUS Algorithm 1. START 2. READ F 3. LET C = (F – 32)*5/9 4. PRINT C 5. STOP START Flow chart READ F LET C = (F – 32)*5/9 PRINT C STOP Python program Output # Convert Fahrenheit to Celsius f=input ('Enter heat in Fahrenheit') c=(f-32)*5/9 print (‘Heat in Celsius scale =’,c) Enter heat in Fahrenheit98 (‘Heat in Celsius scale =’,37)
  • 9. LARGEST OF THREE NUMBERS Algorithm 1. START 2. READ A, B, C 3. IF (A>B): IF (A>C): LARGEST=A ELSE: LARGEST=C ELSE: IF (B>C): LARGEST=B ELSE : LARGEST=C 4. PRINT LARGEST 5. STOP START Flow chart READ A, B, C LARGEST = C PRINT LARGEST STOP IF (A>B) IF (A>C) IF (B>C) LARGEST = A LARGEST = B NOYES YES YES NONO
  • 10. Python program Output # Largest of three numbers a=input (‘Enter first number’) b=input (‘Enter second number’) c=input (‘Enter third number’) if (a>b): if (a>c): largest=a else: largest=b else: if (b>c): largest=b else: largest=c print ('Largest of three numbers is',largest) Enter first number 5 Enter second number 6 Enter third number 88 ('Largest of three numbers is', 88)
  • 11. CHARACTER NAME OF THE DAY Algorithm 1. START 2. READ N 3. IF (N==1): PRINT SUNDAY ELIF (N==2): PRINT MONDAY ELIF (N==3): PRINT TUESDAY ELIF (N==4): PRINT WEDNESDAY ELIF (N==5): PRINT THURSDAY ELIF (N==6): PRINT FRIDAY ELIF (N==7): PRINT SATURDAY ELSE: PRINT INVALID DAY NUMBER 4. STOP START Flow chart READ N IF (N==1) NOYES IF (N==2) IF (N==3) IF (N==4) IF (N==5) IF (N==6) IF PRINT SUNDAY PRINT MONDAY PRINT TUESDAY PRINT WEDNESDAY PRINT THURSDAY PRINT FRIDAY PRINT SATURDAY
  • 12. CHARACTER NAME OF THE DAY Algorithm 1. START 2. READ N 3. IF (N==1): PRINT SUNDAY ELIF (N==2): PRINT MONDAY ELIF (N==3): PRINT TUESDAY ELIF (N==4): PRINT WEDNESDAY ELIF (N==5): PRINT THURSDAY ELIF (N==6): PRINT FRIDAY ELIF (N==7): PRINT SATURDAY ELSE: PRINT INVALID DAY NUMBER 4. STOP Flow chart NO NO NO NO NO NO YES YES YES YES YES YES
  • 13. Python program Output # Character name of the day n=input('Enter the day number') if (n==1): print ('Sunday') elif (n==2): print ('Monday') elif (n==3): print ('Tuesday') elif (n==4): print ('Wednesday') elif (n==5): print ('Thursday') elif (n==6): print ('Friday') elif (n==7): print ('Saturday') else: print ('Not a valid day number') Enter the day number2 Monday
  • 14. ODD OR EVEN Algorithm 1. START 2. READ N 3. IF ( N%2 == 0): PRINT EVEN ELSE PRINT ODD 4. STOP START Flow chart READ N STOP Python program Output # To find given number is odd or even number n=input (‘Enter number’) if (n%2==0): print (‘Even number’) else: print (‘Odd number’) Enter nuber5 Odd number IF (N%2==0 PRINT ODDPRINT EVEN
  • 15. TO PRINT N NATURAL NUMBERS Algorithm 1. START 2. READ N 3. LET i=1 4. WHILE (i <= N): PRINT i LET I = i+1 5. STOP START Flow chart READ N STOPPython program Output # To print N natural numbers n=input (‘Enter Limit’) i=1 While (i<=n): print i i = i+1 Enter Limit3 1 2 3 WHILE (i<=n) LET i = 1 PRINT i LET i = i + 1 YES NO
  • 16. FACTORIAL OF A NUMBER Algorithm 1. START 2. READ N 3. LET fact =1 4. FOR x IN RANGE (1, N+1): fact = fact * x 5. PRINT fact 6. STOP START Flow chart READ N STOPPython program Output # To print factorial of a number n=input (‘Enter number’) fact=1 For x in range (1, n+1): fact=fact*x Print (‘Factorial of given number is’, fact) Enter number5 Factorial of given number is 120 for x in range (1, N+1) LET fact = 1 LET fact = fact * x YES NO PRINT fact
  翻译: