Unit 1 - Computational Thinking

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/45

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

46 Terms

1
New cards

What is decomposition

Breaking down a larger problem into smaller parts

2
New cards

What is abstraction

Removing unnecessary detail to focus only on main points

3
New cards

What is an algorithm

Set of instructions to perform a specific task

4
New cards

What is a subprogram

Self-contained block of code to perform specific task within larger program

5
New cards

What are benefits of subprograms

  • Code can be reused (avoids duplication) - Multiple people can work on same project at the same time - Easier to maintain/debug code - Breaks down larger problem and makes logic clearer and easier to understand
6
New cards

What is the terminal symbol in a flowchart

7
New cards

What is the selection/decision statement in a flowchart

8
New cards

What is the process symbol in a flowchart

9
New cards

What is the input/output symbol in a flowchart

10
New cards

What is the subprogram symbol in a flowchart

11
New cards

What is sequence

Instructions exectued one after the other in a specific order

12
New cards

What is selection

Choosing between 2+ options (e.g. if statement)

13
New cards

What is repetition

Repeating set of instructions until there is a desired outcome

14
New cards

What is condition-controlled repetition

Number of repeats not known (e.g. while True)

15
New cards

What is count-controlled repetition

Repeats a known specific amount of times

16
New cards

What is iteration

Repeating set of instructions until outcome is met (e.g. over items in data structure)

17
New cards

What is a variable

Named location in memory which stores a value which can be changed when the program is running

18
New cards

What is a constant

Named location in memory which stores a value that cannot be changed when the program is running

19
New cards

What is an array

Data structure which can store multiple items of data of the same data type

20
New cards

What is a record

Data structure which can store multiple items of data of different data types

21
New cards

What is an arthimetic operator

Used to perform calculations (e.g. +, -, /, % etc.)

22
New cards

What is a relational operator

Compare items of data (e.g. ==, !=,

23
New cards

What is a logical/boolean operator

Combine relational operators

24
New cards

What is the logical operator AND

all statements must be true to get an overall true

25
New cards

What is the logical operator OR

At least one statement must be true to get an overall true

26
New cards

What is the logical operator NOT

Inverts boolean value of statement

27
New cards

What is a dry run

Mental/pen-paper run through of algorithm one step at a time to help understand it or find errors

28
New cards

What is a trace table

Table containing value of each variable & output to keep track

29
New cards

What is an error

Bug in program preventing it from running or producing unexpected results

30
New cards

What is a syntax error

Code doesn't conform to rules of programming language so code cannot run

31
New cards

What is a runtime error

Occurs while code is running if computer is asked to perform specific task causing program to crash (runs out of memory)

32
New cards

What is a logic error

Program runs but produces unintended or incorrect result

33
New cards

What is a linear search

Brute force starts at beginning and continues over each item until item found or reaches the end

34
New cards

What is the best case for a linear search

Item is in the first position

35
New cards

What is the worst case for a linear search

Last item in list or not in list

36
New cards

What is a binary search

Divide and conquer - splits list in half until item found

37
New cards

What is a binary search dependant on

List must be sorted

38
New cards

What is the best case for a binary search

First median position is item

39
New cards

What is the worst case for a binary search

Last median position is item

40
New cards

What is a bubble sort

Starts at beginning and checks values in pairs, swapping if in wrong order - repeats until each value in right place

41
New cards

What is a repeat in a bubble sort called

Pass

42
New cards

What is the best case for a bubble sort

Already sorted

43
New cards

What is the worst case for a bubble sort

Reversed sorted

44
New cards

What is a merge sort

Breaks down list into component parts and builds back up in correct order

45
New cards

What does the number of compares in a merge sort depend on

Number of items

46
New cards