SlideShare a Scribd company logo
CLASS : 7
Subject : Computer
Topic: programming technique
Good morning
students
introduction
 Computers can not perform any task on their own.
 They need instruction to tell them what to do , how to do
and when to do.
 A set of instruction that direct the computer to do a
specific task is called a program.
 A task is actually a problem that is tracked by a
programmer.
 Programming problem need to be divided in to smaller
step .
Continue…….
 So that each step can be formulated in the form of an
instruction written in a programming languages.
 The activity is termed as a computer programming.
 Computer programming is a sequence of steps requires
for a solving a problem with the help of computer
programming are algorithm , flowchart and pseudo
code(source code).
An algorithm is a step by step
procedures to solve a particular
problem.
It has a finite number of steps.
To write algorithm , we use simple
English language.
General rules for writing an Algorithms:
 An algorithm should have finite number
of steps.
 Algorithm should not dependent on a
particular computer language.
 The step should be executable by
computer.
 Algorithm is independent of
programming language.
 An algorithm must produce an output.
Algorithm and flowchart
Characteristics of Algorithms:
 Precision – the steps are precisely
stated(defined).
 Uniqueness – results of each step are
uniquely defined and only depend on the
input and the result of the preceding steps.
 Finiteness – the algorithm stops after a finite
number of instructions are executed.
 Input – the algorithm receives input.
 Output – the algorithm produces output.
 Generality – the algorithm applies to a set of
Algorithm and flowchart
Advantages of algorithm
 It is a step-wise representation of a solution
to a given problem, which makes it easy to
understand
 It is not dependent on any programming
language, so it is easy to understand for
anyone even without programming
knowledge.
 Every step in an algorithm has its own
logical sequence so it is easy to debug.
 By using algorithm, the problem is broken
down into smaller pieces or steps hence, it
Disadvantages of algorithm
 Algorithms is Time consuming.
 Difficult to show Branching and
Looping in Algorithms.
 Big tasks are difficult to put in
Algorithms
 Writing algorithm takes a long time.
 An Algorithm is not a computer
program, it is rather a concept of how
a program should be.
solved examples
1. Write an algorithm to give instruction for making maggi
noodles as a food.
 Step 1: Start
 Step 2: Take pan with water
 Step 3: Put pan on the burner
 Step 4: Switch on the gas/burner
 Step 5: Put magi and masala
 Step 6: Give two minutes to boil
 Step 7: Take off the pan
 Step 8: Take out the magi with the help of fork/spoon
 Step 9: Put the Maggi on the plate and serve it
 Step 10: Stop
solved examples
1. Write an algorithm to make cup of tea.
 Step 1:Put the teabag in a cup.
 Step 2:Fill the kettle with water.
 Step 3:Boil the water in the kettle.
 Step 4:Pour some of the boiled water into
the cup.
 Step 5:Add milk to the cup.
 Step 6:Add sugar to the cup.
 Step 7:Stir the tea.
 Step 8:Drink the tea.
Algorithm and flowchart
solved examples
1. Write an algorithm to find simple interest.
 Step 1:Start
 Step 2:Read Principal Amount, Rate and
Time
 Step 3:Calculate Interest using formula SI=
((principal*rate*time)/100)
 Step 4:Print Simple Interest
 Step 5:Stop
solved examples
1. Write an algorithm to find area of circle.
 Step1: Start
 Step2: Input the the value of radius R
 Step3: Let PI=3.14
 Step4: Calculate area=PI*R*R
 Step5: Print area
 Step6: End
solved examples
1. Write an algorithm to find greatest number
among two number.
 Step1: Start
 Step2: Input number1 and number2
 Step3: is a>b ?
-if yes print “a is greatest number”
-if no print “b is greatest number”
 Step4: End
solved examples
1. Write an algorithm to find area of rectangle.
 Step1: Start
 Step2: take length and breadth and store in
it L and B.
 Step3: multiply L and B and store in it area.
 Step4: print area
 Step5: End
Algorithm and flowchart
Advantages of flowchart
 The Flowchart is an excellent way of communicating the
logic of a program.
 It is easy and efficient to analyze problem using flowchart.
 During program development cycle, the flowchart plays the
role of a guide or a blueprint. Which makes program
development process easier.
 After successful development of a program, it needs
continuous timely maintenance during the course of its
operation. The flowchart makes program or system
maintenance easier.
 It helps the programmer to write the program code.
 It is easy to convert the flowchart into any programming
language code as it does not use any specific
Disadvantages of flowchart
 The flowchart can be complex when the logic of a program
is quite complicated.
 Drawing flowchart is a time-consuming task.
 Difficult to alter the flowchart. Sometimes, the designer
needs to redraw the complete flowchart to change the logic
of the flowchart or to alter the flowchart.
 Since it uses special sets of symbols for every action, it is
quite a tedious task to develop a flowchart as it requires
special tools to draw the necessary symbols.
 In the case of a complex flowchart, other programmers
might have a difficult time understanding the logic and
process of the flowchart.
 It is just a visualization of a program, it cannot function like
an actual program
Algorithm and flowchart
Algorithm and flowchart
Algorithm and flowchart
Flowchart for area of rectangle
Algorithm and flowchart
Algorithm and flowchart
Algorithm and flowchart
Ad

More Related Content

What's hot (20)

Multiple access techniques for wireless communication
Multiple access techniques for wireless communicationMultiple access techniques for wireless communication
Multiple access techniques for wireless communication
Dr.Umadevi V
 
multiple access techniques used in wireless communication
multiple access techniques used in wireless communicationmultiple access techniques used in wireless communication
multiple access techniques used in wireless communication
Sajid ali
 
CSMA /CD PPT ON SLIDESHARE
CSMA /CD PPT ON SLIDESHARECSMA /CD PPT ON SLIDESHARE
CSMA /CD PPT ON SLIDESHARE
Khushboo Pal
 
Introduction to computer network
Introduction to computer networkIntroduction to computer network
Introduction to computer network
Ashita Agrawal
 
Gsm presentation shaikot
Gsm presentation shaikotGsm presentation shaikot
Gsm presentation shaikot
sivakumar D
 
Bituminous pavement
Bituminous pavementBituminous pavement
Bituminous pavement
Rron de Guzman
 
Frequency Division Multiplexing Access (FDMA)
Frequency Division Multiplexing Access (FDMA)Frequency Division Multiplexing Access (FDMA)
Frequency Division Multiplexing Access (FDMA)
Soumen Santra
 
Check sum
Check sumCheck sum
Check sum
Pooja Jaiswal
 
Introduction to qbasic
Introduction to qbasicIntroduction to qbasic
Introduction to qbasic
Richa Karthikeyan
 
Cellular communication
Cellular communicationCellular communication
Cellular communication
Prashant Gajendra
 
Tdm and fdm
Tdm and fdmTdm and fdm
Tdm and fdm
shyamaliamale
 
Airport marking
Airport markingAirport marking
Airport marking
srinivas2036
 
C material
C materialC material
C material
tarique472
 
Airport design - Railways, airports, docks and harbour engineering (RAHE)
Airport design - Railways, airports, docks and harbour engineering  (RAHE)Airport design - Railways, airports, docks and harbour engineering  (RAHE)
Airport design - Railways, airports, docks and harbour engineering (RAHE)
Shanmugasundaram N
 
Internet and Networking
Internet and NetworkingInternet and Networking
Internet and Networking
nhumar
 
Intro To Programming Concepts
Intro To Programming ConceptsIntro To Programming Concepts
Intro To Programming Concepts
Jussi Pohjolainen
 
Arm teaching material
Arm teaching materialArm teaching material
Arm teaching material
John Williams
 
Introduction to c programming language
Introduction to c programming languageIntroduction to c programming language
Introduction to c programming language
sanjay joshi
 
23a_IRC582015_RP_Design(1).pdf
23a_IRC582015_RP_Design(1).pdf23a_IRC582015_RP_Design(1).pdf
23a_IRC582015_RP_Design(1).pdf
SivaRamaKrishnaUppul
 
Pci,usb,scsi bus
Pci,usb,scsi busPci,usb,scsi bus
Pci,usb,scsi bus
Sherwin Rodrigues
 
Multiple access techniques for wireless communication
Multiple access techniques for wireless communicationMultiple access techniques for wireless communication
Multiple access techniques for wireless communication
Dr.Umadevi V
 
multiple access techniques used in wireless communication
multiple access techniques used in wireless communicationmultiple access techniques used in wireless communication
multiple access techniques used in wireless communication
Sajid ali
 
CSMA /CD PPT ON SLIDESHARE
CSMA /CD PPT ON SLIDESHARECSMA /CD PPT ON SLIDESHARE
CSMA /CD PPT ON SLIDESHARE
Khushboo Pal
 
Introduction to computer network
Introduction to computer networkIntroduction to computer network
Introduction to computer network
Ashita Agrawal
 
Gsm presentation shaikot
Gsm presentation shaikotGsm presentation shaikot
Gsm presentation shaikot
sivakumar D
 
Frequency Division Multiplexing Access (FDMA)
Frequency Division Multiplexing Access (FDMA)Frequency Division Multiplexing Access (FDMA)
Frequency Division Multiplexing Access (FDMA)
Soumen Santra
 
Airport design - Railways, airports, docks and harbour engineering (RAHE)
Airport design - Railways, airports, docks and harbour engineering  (RAHE)Airport design - Railways, airports, docks and harbour engineering  (RAHE)
Airport design - Railways, airports, docks and harbour engineering (RAHE)
Shanmugasundaram N
 
Internet and Networking
Internet and NetworkingInternet and Networking
Internet and Networking
nhumar
 
Intro To Programming Concepts
Intro To Programming ConceptsIntro To Programming Concepts
Intro To Programming Concepts
Jussi Pohjolainen
 
Arm teaching material
Arm teaching materialArm teaching material
Arm teaching material
John Williams
 
Introduction to c programming language
Introduction to c programming languageIntroduction to c programming language
Introduction to c programming language
sanjay joshi
 

Similar to Algorithm and flowchart (20)

Algorithms and flow charts
Algorithms and flow chartsAlgorithms and flow charts
Algorithms and flow charts
Chinnu Edwin
 
Unit 1 python (2021 r)
Unit 1 python (2021 r)Unit 1 python (2021 r)
Unit 1 python (2021 r)
praveena p
 
Algorithm defination, design & Implementation
Algorithm defination, design & ImplementationAlgorithm defination, design & Implementation
Algorithm defination, design & Implementation
Bilal Maqbool ツ
 
Unit 1-problem solving with algorithm
Unit 1-problem solving with algorithmUnit 1-problem solving with algorithm
Unit 1-problem solving with algorithm
rajkumar1631010038
 
Power Point Introduction To Programming 1
Power Point Introduction To Programming 1Power Point Introduction To Programming 1
Power Point Introduction To Programming 1
FabianDaffa3
 
L1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdfL1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdf
MMRF2
 
Python Unit 1.pdfPython Notes for Bharathiar university syllabus
Python Unit 1.pdfPython Notes for Bharathiar university syllabusPython Unit 1.pdfPython Notes for Bharathiar university syllabus
Python Unit 1.pdfPython Notes for Bharathiar university syllabus
ANUSUYA S
 
C++ good tutorial
C++ good tutorialC++ good tutorial
C++ good tutorial
Ezzat Atalla
 
Study Material for Problem Solving Techniques
Study Material for Problem Solving TechniquesStudy Material for Problem Solving Techniques
Study Material for Problem Solving Techniques
Bobby Murugesan
 
Algorithmic problem sloving
Algorithmic problem slovingAlgorithmic problem sloving
Algorithmic problem sloving
Mani Kandan
 
01 Programming Fundamentals.pptx
01 Programming Fundamentals.pptx01 Programming Fundamentals.pptx
01 Programming Fundamentals.pptx
JustineLincopinesAlm
 
Problem solving methodology
Problem solving methodologyProblem solving methodology
Problem solving methodology
Prof. Dr. K. Adisesha
 
Module 1 python.pptx
Module 1 python.pptxModule 1 python.pptx
Module 1 python.pptx
AnuragJoshi813963
 
Introduction to Computer Programming
Introduction to Computer ProgrammingIntroduction to Computer Programming
Introduction to Computer Programming
Prof. Erwin Globio
 
Algorithm for computational problematic sit
Algorithm for computational problematic sitAlgorithm for computational problematic sit
Algorithm for computational problematic sit
Saurabh846965
 
Algorithm.pdf
Algorithm.pdfAlgorithm.pdf
Algorithm.pdf
MIT,Imphal
 
module1 new c programming for begginers.pptx
module1 new c programming for begginers.pptxmodule1 new c programming for begginers.pptx
module1 new c programming for begginers.pptx
amruthavarshini849703
 
Algorithm & Flowchart.pdf
Algorithm & Flowchart.pdfAlgorithm & Flowchart.pdf
Algorithm & Flowchart.pdf
Vpmv
 
Chapter 2(1)
Chapter 2(1)Chapter 2(1)
Chapter 2(1)
TejaswiB4
 
C++ ppt
C++ pptC++ ppt
C++ ppt
parpan34
 
Algorithms and flow charts
Algorithms and flow chartsAlgorithms and flow charts
Algorithms and flow charts
Chinnu Edwin
 
Unit 1 python (2021 r)
Unit 1 python (2021 r)Unit 1 python (2021 r)
Unit 1 python (2021 r)
praveena p
 
Algorithm defination, design & Implementation
Algorithm defination, design & ImplementationAlgorithm defination, design & Implementation
Algorithm defination, design & Implementation
Bilal Maqbool ツ
 
Unit 1-problem solving with algorithm
Unit 1-problem solving with algorithmUnit 1-problem solving with algorithm
Unit 1-problem solving with algorithm
rajkumar1631010038
 
Power Point Introduction To Programming 1
Power Point Introduction To Programming 1Power Point Introduction To Programming 1
Power Point Introduction To Programming 1
FabianDaffa3
 
L1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdfL1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdf
MMRF2
 
Python Unit 1.pdfPython Notes for Bharathiar university syllabus
Python Unit 1.pdfPython Notes for Bharathiar university syllabusPython Unit 1.pdfPython Notes for Bharathiar university syllabus
Python Unit 1.pdfPython Notes for Bharathiar university syllabus
ANUSUYA S
 
Study Material for Problem Solving Techniques
Study Material for Problem Solving TechniquesStudy Material for Problem Solving Techniques
Study Material for Problem Solving Techniques
Bobby Murugesan
 
Algorithmic problem sloving
Algorithmic problem slovingAlgorithmic problem sloving
Algorithmic problem sloving
Mani Kandan
 
Introduction to Computer Programming
Introduction to Computer ProgrammingIntroduction to Computer Programming
Introduction to Computer Programming
Prof. Erwin Globio
 
Algorithm for computational problematic sit
Algorithm for computational problematic sitAlgorithm for computational problematic sit
Algorithm for computational problematic sit
Saurabh846965
 
module1 new c programming for begginers.pptx
module1 new c programming for begginers.pptxmodule1 new c programming for begginers.pptx
module1 new c programming for begginers.pptx
amruthavarshini849703
 
Algorithm & Flowchart.pdf
Algorithm & Flowchart.pdfAlgorithm & Flowchart.pdf
Algorithm & Flowchart.pdf
Vpmv
 
Chapter 2(1)
Chapter 2(1)Chapter 2(1)
Chapter 2(1)
TejaswiB4
 
Ad

Recently uploaded (20)

Chemotherapy of Malignancy -Anticancer.pptx
Chemotherapy of Malignancy -Anticancer.pptxChemotherapy of Malignancy -Anticancer.pptx
Chemotherapy of Malignancy -Anticancer.pptx
Mayuri Chavan
 
Cultivation Practice of Turmeric in Nepal.pptx
Cultivation Practice of Turmeric in Nepal.pptxCultivation Practice of Turmeric in Nepal.pptx
Cultivation Practice of Turmeric in Nepal.pptx
UmeshTimilsina1
 
*"Sensing the World: Insect Sensory Systems"*
*"Sensing the World: Insect Sensory Systems"**"Sensing the World: Insect Sensory Systems"*
*"Sensing the World: Insect Sensory Systems"*
Arshad Shaikh
 
Overview Well-Being and Creative Careers
Overview Well-Being and Creative CareersOverview Well-Being and Creative Careers
Overview Well-Being and Creative Careers
University of Amsterdam
 
What is the Philosophy of Statistics? (and how I was drawn to it)
What is the Philosophy of Statistics? (and how I was drawn to it)What is the Philosophy of Statistics? (and how I was drawn to it)
What is the Philosophy of Statistics? (and how I was drawn to it)
jemille6
 
Drugs in Anaesthesia and Intensive Care,.pdf
Drugs in Anaesthesia and Intensive Care,.pdfDrugs in Anaesthesia and Intensive Care,.pdf
Drugs in Anaesthesia and Intensive Care,.pdf
crewot855
 
The role of wall art in interior designing
The role of wall art in interior designingThe role of wall art in interior designing
The role of wall art in interior designing
meghaark2110
 
E-Filing_of_Income_Tax.pptx and concept of form 26AS
E-Filing_of_Income_Tax.pptx and concept of form 26ASE-Filing_of_Income_Tax.pptx and concept of form 26AS
E-Filing_of_Income_Tax.pptx and concept of form 26AS
Abinash Palangdar
 
2025 The Senior Landscape and SET plan preparations.pptx
2025 The Senior Landscape and SET plan preparations.pptx2025 The Senior Landscape and SET plan preparations.pptx
2025 The Senior Landscape and SET plan preparations.pptx
mansk2
 
Botany Assignment Help Guide - Academic Excellence
Botany Assignment Help Guide - Academic ExcellenceBotany Assignment Help Guide - Academic Excellence
Botany Assignment Help Guide - Academic Excellence
online college homework help
 
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
Dr. Nasir Mustafa
 
All About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdfAll About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdf
TechSoup
 
Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...
parmarjuli1412
 
Ajanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of HistoryAjanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of History
Virag Sontakke
 
Rock Art As a Source of Ancient Indian History
Rock Art As a Source of Ancient Indian HistoryRock Art As a Source of Ancient Indian History
Rock Art As a Source of Ancient Indian History
Virag Sontakke
 
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon DolabaniHistory Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
fruinkamel7m
 
antiquity of writing in ancient India- literary & archaeological evidence
antiquity of writing in ancient India- literary & archaeological evidenceantiquity of writing in ancient India- literary & archaeological evidence
antiquity of writing in ancient India- literary & archaeological evidence
PrachiSontakke5
 
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
Celine George
 
The History of Kashmir Karkota Dynasty NEP.pptx
The History of Kashmir Karkota Dynasty NEP.pptxThe History of Kashmir Karkota Dynasty NEP.pptx
The History of Kashmir Karkota Dynasty NEP.pptx
Arya Mahila P. G. College, Banaras Hindu University, Varanasi, India.
 
Chemotherapy of Malignancy -Anticancer.pptx
Chemotherapy of Malignancy -Anticancer.pptxChemotherapy of Malignancy -Anticancer.pptx
Chemotherapy of Malignancy -Anticancer.pptx
Mayuri Chavan
 
Cultivation Practice of Turmeric in Nepal.pptx
Cultivation Practice of Turmeric in Nepal.pptxCultivation Practice of Turmeric in Nepal.pptx
Cultivation Practice of Turmeric in Nepal.pptx
UmeshTimilsina1
 
*"Sensing the World: Insect Sensory Systems"*
*"Sensing the World: Insect Sensory Systems"**"Sensing the World: Insect Sensory Systems"*
*"Sensing the World: Insect Sensory Systems"*
Arshad Shaikh
 
Overview Well-Being and Creative Careers
Overview Well-Being and Creative CareersOverview Well-Being and Creative Careers
Overview Well-Being and Creative Careers
University of Amsterdam
 
What is the Philosophy of Statistics? (and how I was drawn to it)
What is the Philosophy of Statistics? (and how I was drawn to it)What is the Philosophy of Statistics? (and how I was drawn to it)
What is the Philosophy of Statistics? (and how I was drawn to it)
jemille6
 
Drugs in Anaesthesia and Intensive Care,.pdf
Drugs in Anaesthesia and Intensive Care,.pdfDrugs in Anaesthesia and Intensive Care,.pdf
Drugs in Anaesthesia and Intensive Care,.pdf
crewot855
 
The role of wall art in interior designing
The role of wall art in interior designingThe role of wall art in interior designing
The role of wall art in interior designing
meghaark2110
 
E-Filing_of_Income_Tax.pptx and concept of form 26AS
E-Filing_of_Income_Tax.pptx and concept of form 26ASE-Filing_of_Income_Tax.pptx and concept of form 26AS
E-Filing_of_Income_Tax.pptx and concept of form 26AS
Abinash Palangdar
 
2025 The Senior Landscape and SET plan preparations.pptx
2025 The Senior Landscape and SET plan preparations.pptx2025 The Senior Landscape and SET plan preparations.pptx
2025 The Senior Landscape and SET plan preparations.pptx
mansk2
 
Botany Assignment Help Guide - Academic Excellence
Botany Assignment Help Guide - Academic ExcellenceBotany Assignment Help Guide - Academic Excellence
Botany Assignment Help Guide - Academic Excellence
online college homework help
 
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
Dr. Nasir Mustafa
 
All About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdfAll About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdf
TechSoup
 
Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...
parmarjuli1412
 
Ajanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of HistoryAjanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of History
Virag Sontakke
 
Rock Art As a Source of Ancient Indian History
Rock Art As a Source of Ancient Indian HistoryRock Art As a Source of Ancient Indian History
Rock Art As a Source of Ancient Indian History
Virag Sontakke
 
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon DolabaniHistory Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
fruinkamel7m
 
antiquity of writing in ancient India- literary & archaeological evidence
antiquity of writing in ancient India- literary & archaeological evidenceantiquity of writing in ancient India- literary & archaeological evidence
antiquity of writing in ancient India- literary & archaeological evidence
PrachiSontakke5
 
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
Celine George
 
Ad

Algorithm and flowchart

  • 1. CLASS : 7 Subject : Computer Topic: programming technique Good morning students
  • 2. introduction  Computers can not perform any task on their own.  They need instruction to tell them what to do , how to do and when to do.  A set of instruction that direct the computer to do a specific task is called a program.  A task is actually a problem that is tracked by a programmer.  Programming problem need to be divided in to smaller step .
  • 3. Continue…….  So that each step can be formulated in the form of an instruction written in a programming languages.  The activity is termed as a computer programming.  Computer programming is a sequence of steps requires for a solving a problem with the help of computer programming are algorithm , flowchart and pseudo code(source code).
  • 4. An algorithm is a step by step procedures to solve a particular problem. It has a finite number of steps. To write algorithm , we use simple English language.
  • 5. General rules for writing an Algorithms:  An algorithm should have finite number of steps.  Algorithm should not dependent on a particular computer language.  The step should be executable by computer.  Algorithm is independent of programming language.  An algorithm must produce an output.
  • 7. Characteristics of Algorithms:  Precision – the steps are precisely stated(defined).  Uniqueness – results of each step are uniquely defined and only depend on the input and the result of the preceding steps.  Finiteness – the algorithm stops after a finite number of instructions are executed.  Input – the algorithm receives input.  Output – the algorithm produces output.  Generality – the algorithm applies to a set of
  • 9. Advantages of algorithm  It is a step-wise representation of a solution to a given problem, which makes it easy to understand  It is not dependent on any programming language, so it is easy to understand for anyone even without programming knowledge.  Every step in an algorithm has its own logical sequence so it is easy to debug.  By using algorithm, the problem is broken down into smaller pieces or steps hence, it
  • 10. Disadvantages of algorithm  Algorithms is Time consuming.  Difficult to show Branching and Looping in Algorithms.  Big tasks are difficult to put in Algorithms  Writing algorithm takes a long time.  An Algorithm is not a computer program, it is rather a concept of how a program should be.
  • 11. solved examples 1. Write an algorithm to give instruction for making maggi noodles as a food.  Step 1: Start  Step 2: Take pan with water  Step 3: Put pan on the burner  Step 4: Switch on the gas/burner  Step 5: Put magi and masala  Step 6: Give two minutes to boil  Step 7: Take off the pan  Step 8: Take out the magi with the help of fork/spoon  Step 9: Put the Maggi on the plate and serve it  Step 10: Stop
  • 12. solved examples 1. Write an algorithm to make cup of tea.  Step 1:Put the teabag in a cup.  Step 2:Fill the kettle with water.  Step 3:Boil the water in the kettle.  Step 4:Pour some of the boiled water into the cup.  Step 5:Add milk to the cup.  Step 6:Add sugar to the cup.  Step 7:Stir the tea.  Step 8:Drink the tea.
  • 14. solved examples 1. Write an algorithm to find simple interest.  Step 1:Start  Step 2:Read Principal Amount, Rate and Time  Step 3:Calculate Interest using formula SI= ((principal*rate*time)/100)  Step 4:Print Simple Interest  Step 5:Stop
  • 15. solved examples 1. Write an algorithm to find area of circle.  Step1: Start  Step2: Input the the value of radius R  Step3: Let PI=3.14  Step4: Calculate area=PI*R*R  Step5: Print area  Step6: End
  • 16. solved examples 1. Write an algorithm to find greatest number among two number.  Step1: Start  Step2: Input number1 and number2  Step3: is a>b ? -if yes print “a is greatest number” -if no print “b is greatest number”  Step4: End
  • 17. solved examples 1. Write an algorithm to find area of rectangle.  Step1: Start  Step2: take length and breadth and store in it L and B.  Step3: multiply L and B and store in it area.  Step4: print area  Step5: End
  • 19. Advantages of flowchart  The Flowchart is an excellent way of communicating the logic of a program.  It is easy and efficient to analyze problem using flowchart.  During program development cycle, the flowchart plays the role of a guide or a blueprint. Which makes program development process easier.  After successful development of a program, it needs continuous timely maintenance during the course of its operation. The flowchart makes program or system maintenance easier.  It helps the programmer to write the program code.  It is easy to convert the flowchart into any programming language code as it does not use any specific
  • 20. Disadvantages of flowchart  The flowchart can be complex when the logic of a program is quite complicated.  Drawing flowchart is a time-consuming task.  Difficult to alter the flowchart. Sometimes, the designer needs to redraw the complete flowchart to change the logic of the flowchart or to alter the flowchart.  Since it uses special sets of symbols for every action, it is quite a tedious task to develop a flowchart as it requires special tools to draw the necessary symbols.  In the case of a complex flowchart, other programmers might have a difficult time understanding the logic and process of the flowchart.  It is just a visualization of a program, it cannot function like an actual program
  • 24. Flowchart for area of rectangle
  翻译: