Understanding Algorithms: A Primer for Computer Studies
Delve into the world of algorithms with Ms. Jennifer as your guide in this educational series. Learn the nuances of processes, pseudo-code, and problem-solving steps through structured lessons. Grasp the essence of expressions, flowcharts, and the language of algorithms, ensuring a solid foundation in algorithmic thinking.
Download Presentation
Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
E N D
Presentation Transcript
Introduction to Algorithm part 1 Senior 5 Computer Studies Ms Jennifer
An Algorithm is a step by step process to solve a computing problem. Start Step 1 Step 2 Step 3 Step 4 Step End Process What is an Algorithm? Ms Jennifer
A process is a series of steps (instructions) to achieve a particular goal What is a process? Ms Jennifer
1. Think of a solution to the problem 2. Think of the steps required to achieve the final solution. 3. Write down the STEPS. How can we express a an algorithm? Ms Jennifer
Pseudo code means false code and it is essentially a summary of the algorithm written in steps using a language and specific terms. There are no set rules in using pseudo as long as all the steps of the algorithm are written sequentially and are logically correct. What is Pseudo code? Ms Jennifer
Specific terms used in pseudo code include: Arithmetic operations Transfer operations Input / output operations Decision operations Repetition operations What is Pseudo code? Ms Jennifer
How do you log in to Facebook? Answer? Use a laptop, tablet, computer, smart phone, etc. How do you write an algorithm to log in to Facebook? 1st step: Go to www.facebook.com 2nd step: Enter email and password 3rdstep: Click on Login in button. Example question Ms Jennifer
Pseudo Code Flowcharts Graphical representation of the sequence of steps of an algorithm. Step by step instructions similar to computer code. An algorithm is constructed with Pseudo Code and Flowcharts Ms Jennifer
Person A has 6 subjects Person B has 3 subjects Sum = A + B Print Sum How many subjects there is in Sum? Sum = A B Print Sum How many subjects there is in Sum? Pseudo code for Arithmetic calculations Ms Jennifer
A = 0; B = 0; Give input value to A Save A Give input value to B Save B Sum = A x B Print Sum What is the value of Sum? Pseudo code for Arithmetic calculations (input and output) Ms Jennifer
Flow Chart of Arithmetic calculation (input and output) Ms Jennifer
Tasks Conclusion Algorithm Topic first part Ms Jennifer
An algorithm is a step by step process to solve a computing problem. A process is a series of steps or instructions to achieve a particular goal. An algorithm can be developed through pseudo code and flowcharts. Pseudo code defines the algorithm in a series of sequential steps/ instructions Flowcharts express the steps of an algorithm in a graphical representation. Each shape means a particular stage or step of an algorithm. Conclusion Ms Jennifer
Introduction to Algorithm part 2 Senior 5 Computer Studies Ms Jennifer
Pseudo Code Flowcharts Graphical representation of the sequence of steps of an algorithm. Step by step instructions similar to computer code. An algorithm is constructed with Pseudo Code and Flowcharts Ms Jennifer
Concept Flowchart Ms Jennifer
Flow Chart of Arithmetic calculation (input and output) Ms Jennifer
Mixer Flowchart Decisions / Repetitions Ms Jennifer
Task 1 Pseudo code of kitchen mixer Ms Jennifer
Pseudo Code: 1st step: Go to www.facebook.com 2nd step: Enter email and password 3rdstep: Click on Login in button. Task 2 Flowchart to log in to Facebook Ms Jennifer
1. Put coffee with boiling water in the cup 2. Add steamed milk to the top of cup Steps to make art coffee. Ms Jennifer
4. Draw inward and outward lines with a toothpick. 3. Make circular designs with chocolate sauce. Steps to make art coffee. Ms Jennifer
End result Web coffee art! Steps to make art coffee. Ms Jennifer
Pseudo Code If [] Then [ .] Else [ .] statements Conditional statements Ms Jennifer
Start Program Step 1. If cup has coffee Then -> Add milk Else Add coffee Step 2. If cup has coffee + milk Then -> Add chocolate sauce in circular motion Else go to step 1 Step 3. If cup has chocolate sauce on top Then -> make horizontal lines with toothpick Else go to step 2 Step 4. End If Coffee has horizontal chocolate lines.. Else go to step 3 End program Note: the conditional statements in red Pseudo Code for coffee art. Ms Jennifer
Task 3 Develop flowchart Ms Jennifer
An algorithm is a step by step process to solve a computing problem. In computing an algorithm is expressed by pseudo code and flowcharts. Pseudo code consists of a sequence of steps to solve a computing problem. Flowcharts are used to show the sequence of steps in a graphical representation using different shapes to present terminals, processes, decisions and inputs and outputs. Conclusion Ms Jennifer