Algorithms & Programming (Revise String Manipulation + Sub Routines In Python And Pseudocode) Flashcards
(25 cards)
What are the three characteristics of computational thinking?
Decomposition, abstraction & algorithmic thinking
What is a variable?
A named memory location that can hold/store a value that can be changed during program execution
What is the float data type?
Numbers that have a decimal point e.g. 1.9
Written as real
What is the character data type?
A single letter, number or symbol e.g. “p”
Written as char
What is an algorithm?
Sets of instructions used for solving a problem
What are computer systems made up of?
Inputs, outputs and processes
What symbol is used for each part of a program?
START/STOP = Oval
INPUTS/OUTPUTS = Parallelogram
PROCESSES = Rectangle
DECISIONS = Diamond
SUB PROGRAM = Rectangle with shaded sides
What are the 3 basic programming constructs?
Sequence
Selection
Iteration
What does sequence mean?
A series of steps which are completed one after the other
What doe selection mean?
The ability to choose different paths through a program
What does iteration mean?
The repeating part of a program
Where does the !, <, > go in comparison operators?
!=
>=
<=
>
<
==
How does switch case work?
switch [variable name]
case “[input]”:
print(“”)
case “[other input option]”:
do something
default:
do something else
endswitch
What is declaration?
Declaring a variable or constant as a certain data type
What is initialisation?
Setting an initial value for a variable/constant
What is an assignment?
Changing the value held at a variable/constant
What is an identifier?
The name given to a variable/constant as
What is abstraction?
Picking out the important bits of information and ignoring the specific details that don’t matter
What is decomposition?
Breaking down a complex problem into smaller problems and solving each one individually
What does DIV do?
Returns the whole number part of a division
What does MOD do?
Returns the remainder of a division
How do you calculate exponentiation?
Use ^ or **
List as many ways of string manipulation as possible
https://www.savemyexams.com/gcse/computer-science/ocr/22/revision-notes/8-programming-fundamentals/additional-programming-techniques/string-manipulation/
Or pg. 53 revision guide
What is a procedure?
Sets of instructions that do not return a value, e.g. printing certain things