12.03/12.04 - Expressing algorithms/Variables Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

In computer science, when we design a solution to a problem we express the algorithm using…

A

…sequences of steps writting in structured english or pseudocode

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is Structured English?

A

It is a subset of the English language and consists of command statements

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a pseudocode?

A

It resembles a programming language without following the syntax of a particular programming language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a flowchart?

A

It is an alternative method of representing an algorithm. It is consisted of specific shapes linked together

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the 4 basic types of construct?

A
  1. Assignment
  2. Sequences
  3. Selection
  4. Repetition
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is assignment?

A

It is a value given to an identifier or a value associated with a given identifier is changed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a sequence?

A

A number of steps are performed, one after the other

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is selection?

A

Under certain conditions some steps are performed, otherwise different(or no) steps are performed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is repetition?

A

A sequence of steps is performed a number of times. This is also known as iteration or looping.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are variables?

A

They are specific memory locations where we can write statements of what to do with the value stored there

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the label of a variable called?

A

An Identifier

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Name the special characteristics of identifiers

A
  • Cannot contain any spaces
  • Can only contain letters, digits and _ (the underscore symbol)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the common formatting convection used to make identifiers easier to read?

A

CamelCaps

How well did you know this?
1
Not at all
2
3
4
5
Perfectly