Section 1&2 Flashcards
What is decomposition?
Breaking a complex problem down into a smaller problems and solving each one individually.
What is abstraction?
Picking out the important bits of information from the problem, ignoring specific details that don’t matter.
What is algorithmic thinking?
A logical way of getting from the problem to the solution.
What is pseudo code?
Pseudo-code is not an actual programming language but it should follow a similar structure and read like one.
What does the shapes mean?
Oval- start and stop
Parallelogram- input/ output
Rectangle- process
Diamond- decision
What are the two types of search algorithms?
Binary search and linear search
What is binary search?
When you find the middle item in an ordered list and then check if the value is higher or lower. Then keep splitting it in half till u find it.
What is linear search?
Looking through it one by one.
Name the two sorting algorithms
Bubble sort and merge sort
What is a bubble sort?
Look at the first two items in the list. If they’re in the right order, you don’t have to do anything. If they’re in the wrong order, swap them. Move onto the next pair. Keep repeating till it’s sorted.
What is merge split?
When you split the list in half and keep repeating it till they are in pairs. Then you leave them or switch them into the right order. Then you put them back together slowly pair by pair siting them all the way.
What are the 4 different data types?
Integer- whole numbers Real- decimal points Boolean-only two values Character- a single letter, number or symbol. String-collection of characters.
How much memory does each data type take?
Integer-2 bytes or 4 bytes Real- 4 bytes or 8 bytes Boolean- 1 byte Character- 1 byte String- 1 byte for each character
What is casting?
Languages have function that let you manually convert between data types.
List the casting conversions.
String_TO_INT(‘1’)
INT_TO_STRING(1)
STRING_TO_REAL(‘1.0’)
REAL_TO_STRING (1.0)
What are the 6 different operators?
Addition= + Subtraction= - Multiplication= * Division= / Integer division= DIV Remainder= MOD
Name the comparison operators
Is equal to - = Is not equal to- equal with a line through it Is less than- < Is greater than- > Is less than or equal to- >/ Is greater than or equal to- \
What is a constant?
A constant is assigned a value at design time that can’t be changed. If you attempt to change the value of a constant in a program then an error message will be returned. It has to be declared.
What is a variable?
Variable can change value which makes them far more useful than constants. It has to be declared.
What is concatenation?
When two strings are joined together.