Download presentation
Presentation is loading. Please wait.
1
A451 Theory – 7 Programming 7A, B - Algorithms
2
Learning Intentions To develop an understanding of how algorithms are used to represent computer systems and programs
3
Assessment Outcomes 7A - understand algorithms (written in pseudocode or flow diagram), explain what they do, and correct or complete them 7B - Produce algorithms in pseudocode or flow diagrams to solve problems.
4
7 – Understanding Algorithms
In computing we write programs or create computer systems to “solve a problem”. The problem is the need or requirement we have to meet. Before you can code the solution to the problem you must first solve it. The outline of a solution is called an algorithm. An algorithm is defined as: a series of steps to solve a problem. For your GCSE you need to be able to represent algorithms in two different ways: Flow Charts Pseudocode
5
7A – Flow Chart Algorithms
Symbol Name Use Terminator Show where the program starts and stops Inputs Shows an input into the system. Can be something that the user types, or that is scanned in (like a barcode) Decision Box Must always ask a question. Takes the program in different routes dependent upon what the answer. Process Something happens – must include a verb! Add, subtract, divide, change, set, etc. Storage Save to a file or database. A system flow chart is an industry‐standard design tool that is used to show an algorithm diagrammatically. There are standard symbols that you will need to understand: Terminators Inputs Decision Boxes Process Storage
6
7B – Flow Chart Example A computerized form prompts a user to enter their address. The validation rules check if the address has an @ symbol in it. If it doesn’t, an error message is displayed, the text box is cleared and the system asks the user to enter the address again. This continues until an appropriate address is entered. The system then checks that the address has been typed in lowercase, if not it converts it to lowercase. Once the address is ok it is stored in the customer database.
7
7A/B - Pseudocode Pseudocode is when we write an algorithm in programming‐style constructs but not in an actual programming language. A computerized form prompts a user to enter their address. The validation rules check if the address has an @ symbol in it. If it doesn’t, an error message is displayed, the text box is cleared and the system asks the user to enter the address again. This continues until an appropriate address is entered. The system then checks that the address has been typed in lowercase, if not it converts it to lowercase. Once the address is ok it is stored in the customer database. INPUT address If address contains if address is lowercase: store in CustomerFile else: convert to lowercase Else: display error message
8
Crib – Fundamental topics
Define the term algorithm Explain what algorithms are used for Explain what Flow Charts and Pseudocode are used for Explain the 5 different flow chart shapes Draw an example of a flow chart Write an example of Pseudocode
9
Exam Questions I have ripped off every exam question for Unit 1 – Fundamentals of Computing.. Answer all of the questions in the A, B, C folder. Self Assess them all. Get me to check them!
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.