Section 1 Flashcards
What is computational thinking?
thinking process to solve a problem, so you can formulate a sort solution through a computer
Define Decomposition and Identify the Advantages
Breaking down a complex into smaller parts
-Adv:
-easier problems are to solve
-can be used in other programs
-different people work on different parts(faster)
Define Abstraction
Is when you take out unnecessary details and only using necessary details
Define Algorithm
A specific sequence of steps or set of instructions for a computer to follow in order to complete a task
A Flowchart
Useful tools to develop a solution to a problem.
-They have symbols such as:
START, END (terminal)
input,output(parallelogram)
A flow line leading to each symbol and part
Decision(diamond)
Process(rectangle)
Subroutine(rectangle with little lines cut off on each end)
Pseudo Code
Not an actual programming language but it is a mixture or Python and English
Useful for developing algorithms in a programming style construct
Trace Tables
Is a technique used to show how values of variables change during the execution of a program and how it is run
What is the efficiency of an algorithm depended on?
How fast the program will run
Types of algorithms
Linear/Binary Search
Merge/Bubble Sort
Linear Search
Starting from the beginning of data, checking each piece to see if it is the part we are trying to find
Adv: Doesnt require data in order
Work on any type of storage device
Disadv: Efficient for smaller programs
Inefficient for larger programs
Binary Search
Where you calculate the mid-point of the data set check to see if item is found
if item found is lower than mid-point then repeat on left half of set
If item is greater than mid-point repeat on right side of data set
Repeat until item is found or there are no checks to do
Adv:
More efficient than linear search on average
Disadv:
Does require data set to be in order of a key field
Merge Sort
Fast two-stage sort where a list is constantly divided in half until it becomes one list in order.
Adv:Uses divide and conquer method
-Efficient method
-creates two or more sub-problems solving them individually
-combines solution to solve bigger program
-Works well for large data sets
Bubble sort
Repeatedly going through list swapping adjacent elements if they are in the wrong order
Adv: Sorts unordered lists
-Popular choice for small data sets