Computational Thinking Flashcards
What is the definition of ‘Computational Thinking’?
- A systematic approach to solving problems
- Understanding a problem and developing possible solutions that can be understood by a computer/person/both
What are the 3 characteristics of Computational Thinking?
1) . Decomposition
2) . Abstraction
3) . Algorithmic Thinking
What is ‘decomposition’?
Decomposition is the breaking down of problems into smaller/more manageable sub-problems.
What is ‘abstraction’?
Abstraction is the removing unnecessary info and focusing on important details.
What is ‘algorithmic thinking’?
Algorithmic thinking is when you develop an algorithm to solve a problem —> precise step-by-step solution to a problem that can be replicated.
What is the definition of an algorithm?
An algorithm is a precise set of instructions, executing these instructions is meant to solve a problem.
What is the difference between an algorithm and a computer program?
- Computer programs are interactive but algorithms aren’t
- An algorithm describes the logic of a solution
- A program is an implentation of this solution, written in programming language
- Programs have to be precise (no mistakes)
What is a ‘linear search’?
A linear search is when you check each item in a list/sequence one at a time to see if it is the right item.
Best-case scenario: first item = search item
Worst-case scenario: last item = search item
What is a ‘binary search’?
- Take an ordered list and search item
- Find the item in the middle of the range
- Compare midpoint to search item
- If search item = midpoint, then stop
- If the midpoint is lower then the search item, change the range to the items after the midpoint
- If the midpoint is higher then the search item, change the range to the items before the midpoint
- Repeat (2-6) until the search item = midpoint
What is a ‘bubble sort’?
- A bubble sort is when you repeatedly go through a list, comparing adjacent items and swapping the items if they are in the wrong order
- Each item the algorithm goes the list it is called a pass. The pass through the list is repeated until the list is sorted
What is an ‘insertion sort’?
- An insertion list is when you insert an item in the correct list
- Works by grouping the items in a list into 2 parts:
- Sorted sub-list
- Unsorted sub-list