12.03/12.04 - Expressing algorithms/Variables Flashcards
In computer science, when we design a solution to a problem we express the algorithm using…
…sequences of steps writting in structured english or pseudocode
What is Structured English?
It is a subset of the English language and consists of command statements
What is a pseudocode?
It resembles a programming language without following the syntax of a particular programming language
What is a flowchart?
It is an alternative method of representing an algorithm. It is consisted of specific shapes linked together
What are the 4 basic types of construct?
- Assignment
- Sequences
- Selection
- Repetition
What is assignment?
It is a value given to an identifier or a value associated with a given identifier is changed
What is a sequence?
A number of steps are performed, one after the other
What is selection?
Under certain conditions some steps are performed, otherwise different(or no) steps are performed
What is repetition?
A sequence of steps is performed a number of times. This is also known as iteration or looping.
What are variables?
They are specific memory locations where we can write statements of what to do with the value stored there
What is the label of a variable called?
An Identifier
Name the special characteristics of identifiers
- Cannot contain any spaces
- Can only contain letters, digits and _ (the underscore symbol)
What is the common formatting convection used to make identifiers easier to read?
CamelCaps