Unit 1 Flashcards

1
Q

What are the skills of computational thinking

A

Decomposition

Pattern recognition

Pattern generalisation and abstraction

Algorithm design

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

What is Decomposition

A
  • Identifying and describing problems and processes.
  • Breaking down problems and processes into distinct steps.
  • Describing problems and processes as a set of structured steps.
  • Communicating the key features of problems and processes to others.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is pattern recognition

A
  • Identifying common elements or features in problems or systems.
  • Identifying and interpreting common differences between processes or problems.
  • Identifying individual elements within problems.
  • Describing patterns that have been identified.
  • Making predictions based on identified patterns.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is Abstraction

A

• Identifying information that is necessary to solve an identified problem.
• Filtering out information that is not needed to solve an identified problem.
• Representing parts of a problem or system in general terms by identifying:
o variables
o constants
o key processes
o repeated processes
o inputs
o outputs.

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

Label these flowchart symbols

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

What are the key data types

A

o alphanumeric strings
o arrays
o Boolean
o characters
o date/time
o floating point (real)
o integers
o objects
o records
o sets
o strings.

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

What is a record (or structure)

A

A record is a set layout for holding multiple different types of data in one object. For example a use for a record would be storing information about students in a school

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

What is a stack ( and name a use for one )

A

A stack is a LIFO (Last In First Out) data structure that has numorus uses.

The last in first out nature of a stack makes them incredibly useful for things like recursive algorithms.

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

What is a queue (and name a use for one)

A

A queue is a FIFO (First In First Out) data structure. the name makes it pretty obvious how it works. A use for a queue could be queuing commands to be sent to a server, or even something like orders to be made at a resturant

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

What is a set

A

A set is a data type that can hold unique values, without a particular order. A set can be used with other sets to find items that are shared across sets among other uses

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

Create a list of 5 random numbers and sort it on paper using bubble sort

A

If your sorting looks similar to this you did it right

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

Name 1 pros and 2 cons of bubble sort

A

Pro: Simple to implement / understand

Cons: Slow, Practically useless, rarely avalible in libraries so the developer will have to implement it by hand whereas with other algorithms it may be built into the language already

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

Make a list of 6 random numbers and sort it using quick sort

A

if it is done something like this it has been done correctly

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

Name 2 Pros and 2 Cons of quick sort

A

Pros: Very fast, Comes pre implemented with most coding languages

Cons: Complex, its worst case speed is very slow

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

Make a list of 6 numbers and sort it using insertion sort

A

if it looks like this it should be correct

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

Name pros and cons of insertion sort

A

Pros: Easy to implement, Quite fast, Very low memory usage

Cons: on large lists other algorithms outperform it

17
Q

What is linear search and what are the pros and cons

A

Iterating over each item in a list untill the desired item is found

Pros: Easy to implement, works on all types of data

Cons: slow

18
Q

What is binary search and what are the pros and cons

A

Binary search compares the target value to the middle element of the array. If they are not equal, the half in which the target cannot lie is eliminated and the search continues on the remaining half, again taking the middle element to compare to the target value, and repeating this until the target value is found.

Pros: Fast

Cons: requires a sorted list

19
Q

What is a class

A

The blueprint of an objecct

20
Q

What is a method

A

The associated actions of an object (functions)

21
Q

What is an instance

A

every object created from the same class

22
Q

What is an object

A

A collection of data and its associated actions

23
Q

1738, ay im like hey whats up hello

A

fetty wap

24
Q

What is a subroutine

A

A subroutine is a sequence of instructions to perform a specific task with an identifiable name

Subroutines can be called upon whenever they are required

Procedures and functions are both examples of subroutines

25
Q
A
26
Q
A
27
Q
A
28
Q
A