Download presentation
Presentation is loading. Please wait.
1
Programming Logic n Techniques
Algorithm, Flow chart, Standard flowchart symbols
2
PLT ( Programming logic techniques )
Solving problem is the core of computer science PLT is an introduction to comp-based problem solving techniques programming solving techniques that aid programmer and computer scientists ( core = important ) ( aid = help ) Core = importance, aid = help
3
Local approach for prob. solving
PLT provides a systematic approach to solve a prob. In step by step process
4
Pseudo code Pseudo code is an artificial and informal language that helps programmers to develop algorithm
5
Algorithm Algorithm is a method of representing the step-by-step logical procedure for solving a problem
6
Features of Algorithm Algorithms make our work easy in solving the problems Every step is clearly described Data flow is processed in Top – Down approach Algorithms can easily be converted into flow charts Errors can be easily detected EX :- Write down an Algorithm to prepare tea
7
Write an Algorithm to find the sum of 3 numbers
Step1 : Read the numbers a,b,c. Step2 : compute the sum of a,b,c. Step3 : Divide the sum by 3. Step4 : Store the result in variable d. Step5 : Print the value of d. Step6 : End the program.
8
Flowchart Flowchart is a graphical representation of an algorithm, it is an alternate technique to solve the prob.
9
Features of flowchart Provides a better way of pictorial representation of algorithm. Donates the flow of data control. Problem solving is easy thus save time. Helps in rectifying the errors easily.
10
Standard Flowchart symbols
Terminal 2) Input /output 3) Process Start / stop ( or ) Beginning n ending To give input or to declare output represent steps in processing of data ( 26 )
11
Standard Flowchart symbols
4) Decision 5) On page Connector 6) Flow Symbols shows the decision and other processing steps. Continue the flow on the same page Donates the direction and order of the steps ( 26 )
12
IMP points to draw Flowchart
FC should be clear, neat N easy to follow Should be logically correct Should be verified for validity directions should be top – down N left / right
13
Limitations of FC Fc’s are difficult to modify
Translation of FC into comp. program Is always not easy Connectors are used to joint pages
14
Advantages of FC Logic of the prog. Is clearly declared
easy to follow the logic Draw a FC to prepare a cup of tea
15
Add water, sugar milk , tea powder in a container
Start Add water, sugar milk , tea powder in a container Boil the contents Pour coffee in a cup Stop ( 27 )
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.