100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Lecture notes

1.9 Algorithms

Rating
-
Sold
-
Pages
8
Uploaded on
11-06-2019
Written in
2016/2017

Full notes for the module 1.9 Algorithms









Whoops! We can’t load your doc right now. Try again or contact support.

Document information

Uploaded on
June 11, 2019
Number of pages
8
Written in
2016/2017
Type
Lecture notes
Professor(s)
Unknown
Contains
All classes

Content preview

AS Computing
Unit 1.9 – Algorithms
What is an Algorithm?
An algorithm is a finite set of instructions to solve a problem. These instructions must be able to be
processed by a computer. They can be represented in pseudocode or flowcharts.

What Are Three Possible Algorithm Structures?

1. Sequence
a. A set of instructions that are executed one after another.
b. They are used when you want things to happen in a certain order.
c. An example of this is logging on to a school network.
d. Examples:
i. Making a cup of tea.
ii. Baking a cake.
iii. Getting dressed for school.
2. Selection
a. A set of choices from which one can be chosen.
b. They are used when you want your solution to make a decision.
c. An example of this is deciding whether to put a coat on depending on whether it is
cold outside.
d. Essentially If, Then, Else statements.
3. Iteration
a. An algorithm that will run until a condition is met or a result is achieved.
b. They are used when you want something done and it will take more than one
process.
c. May be repeated a fixed number of times or even a variable number.
d. An example of this is washing your car until the car is clean.
e. Essentially, Loops.

What is Dry-Running an Algorithm?

It is when you read an algorithm and work out what it does and what it is supposed to do. A dry run
does not involve coding or a computer.

Why Are Self-Documenting Variables and Identifiers Important?

1. If the development stage takes a long time they are useful to remind the developer what
they do.
2. Useful for other programmers who have to perform maintenance on the code so that they
can understand what the program does and how to fix it.
3. It is good practice and companies often have house styles/policies requiring employees to
adopt certain coding styles.




Page |1 Luca Passariello AS Computing
£5.49
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
luca_pass

Also available in package deal

Thumbnail
Package deal
WJEC AS Computer Science Unit 1
-
2 12 2019
£ 65.88 More info

Get to know the seller

Seller avatar
luca_pass Cardiff University
View profile
Follow You need to be logged in order to follow users or courses
Sold
2
Member since
6 year
Number of followers
2
Documents
24
Last sold
2 year ago

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these revision notes.

Didn't get what you expected? Choose another document

No problem! You can straightaway pick a different document that better suits what you're after.

Pay as you like, start learning straight away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and smashed it. It really can be that simple.”

Alisha Student

Frequently asked questions