Algorithms & Programming (Revise String Manipulation + Sub Routines In Python And Pseudocode) Flashcards

(25 cards)

1
Q

What are the three characteristics of computational thinking?

A

Decomposition, abstraction & algorithmic thinking

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

What is a variable?

A

A named memory location that can hold/store a value that can be changed during program execution

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

What is the float data type?

A

Numbers that have a decimal point e.g. 1.9
Written as real

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

What is the character data type?

A

A single letter, number or symbol e.g. “p”
Written as char

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

What is an algorithm?

A

Sets of instructions used for solving a problem

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

What are computer systems made up of?

A

Inputs, outputs and processes

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

What symbol is used for each part of a program?

A

START/STOP = Oval
INPUTS/OUTPUTS = Parallelogram
PROCESSES = Rectangle
DECISIONS = Diamond
SUB PROGRAM = Rectangle with shaded sides

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

What are the 3 basic programming constructs?

A

Sequence
Selection
Iteration

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

What does sequence mean?

A

A series of steps which are completed one after the other

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

What doe selection mean?

A

The ability to choose different paths through a program

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

What does iteration mean?

A

The repeating part of a program

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

Where does the !, <, > go in comparison operators?

A

!=
>=
<=
>
<
==

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

How does switch case work?

A

switch [variable name]
case “[input]”:
print(“”)
case “[other input option]”:
do something
default:
do something else
endswitch

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

What is declaration?

A

Declaring a variable or constant as a certain data type

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

What is initialisation?

A

Setting an initial value for a variable/constant

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

What is an assignment?

A

Changing the value held at a variable/constant

17
Q

What is an identifier?

A

The name given to a variable/constant as

18
Q

What is abstraction?

A

Picking out the important bits of information and ignoring the specific details that don’t matter

19
Q

What is decomposition?

A

Breaking down a complex problem into smaller problems and solving each one individually

20
Q

What does DIV do?

A

Returns the whole number part of a division

21
Q

What does MOD do?

A

Returns the remainder of a division

22
Q

How do you calculate exponentiation?

23
Q

List as many ways of string manipulation as possible

A

https://www.savemyexams.com/gcse/computer-science/ocr/22/revision-notes/8-programming-fundamentals/additional-programming-techniques/string-manipulation/

Or pg. 53 revision guide

24
Q

What is a procedure?

A

Sets of instructions that do not return a value, e.g. printing certain things

25
What is a function?
A sub routine that always returns a value