State the name of each of the following computational thinking techniques.
Breaking a complex problem down into smaller problems. | |
---|---|
Hiding or removing irrelevant details from a problem to reduce the complexity. |
Did this page help you?
State the name of each of the following computational thinking techniques.
Breaking a complex problem down into smaller problems. | |
---|---|
Hiding or removing irrelevant details from a problem to reduce the complexity. |
How did you do?
Did this page help you?
The following table contains several definitions of terms that are used in Computer Science.
Letter | Definition |
---|---|
A | Cleaning up data entered by removing non-standard characters |
B | Hiding or removing irrelevant details from a problem to reduce complexity |
C | Checking that the user is allowed to access the program |
D | Breaking a complex problem down into smaller problems |
E | Repeating elements of a program |
F | Converting one data type to another, for example converting an integer to a real number |
Write the letter of the definition that matches each keyword in each space.
Keyword | Letter |
---|---|
Decomposition | |
Abstraction | |
Input sanitisation | |
Casting |
How did you do?
Did this page help you?
A list of valid discount codes is shown below.
[NIC12B, LOR11S, STU12M, VIC08E, KEI99M, WES56O, DAN34S]
State one reason why a binary search would not be able to be used with this data.
How did you do?
Give the name of one searching algorithm that would be able to be used with this data.
How did you do?
Did this page help you?
A program stores the following list of positive and negative numbers. The numbers need sorting into ascending order using a merge sort.
45 | 12 | -99 | 100 | -13 | 0 | 17 | -27 |
---|
The first step is to divide the list into individual lists of one number each. This has been done for you.
Complete the merge sort of the data by showing each step of the process.
How did you do?
Once the numbers are in order, a binary search can be run on the data.
Describe the steps a binary search will follow to look for a number in a sorted list.
How did you do?
A linear search could be used instead of a binary search.
Describe the steps a linear search would follow when searching for a number that is not in the given list.
How did you do?
Did this page help you?
A sample of data is shown in Fig. 4.
amber | house | kick | moose | orange | range | wind | zebra |
---|
Fig. 4
Show the stages of a binary search to find the word zebra using the data shown in Fig. 4.
How did you do?
Did this page help you?
Tick (✓) one box in each row to identify whether each statement about the insertion sort is true or false.
Statement | True (✓) | False (✓) |
---|---|---|
The list of words is initially split into a sorted set and an unsorted set. | ||
The insertion sort uses a divide stage and then a conquer stage. | ||
The list of words must be in order before the insertion sort can start. | ||
Each word is inserted into the correct place in the array, one by one. | ||
The insertion sort will not work because the word “wall” appears twice. |
How did you do?
The sorted list of words is shown below.
flour | house | pumpkin | wall | wall |
---|
Explain how a binary search would be used to try to find whether the word “house” appears in this list.
How did you do?
Did this page help you?
Taylor has used computational thinking techniques to develop an algorithm.
Give two computational thinking techniques that Taylor could have used, describing how they could have been used.
Computational thinking technique | How could it have been used? |
---|---|
How did you do?
Did this page help you?
The following names of students are stored in an array with the identifier studentnames.
studentnames = ["Rob", "Anna", "Huw", "Emma", "Patrice", "Iqbal"]
Describe the steps that a linear search would take to find Anna
in studentnames
How did you do?
Did this page help you?
The names of students are sorted into ascending alphabetical order using an insertion sort.
Complete the following diagram to show the stages an insertion sort would take to complete this task.
Each row represents one pass of the insertion sort algorithm.
You may not need to use all empty rows.
How did you do?
Did this page help you?
Elliott plays football for OCR FC.
He wants to create a program to store the results of each football match they play and the names of the goal scorers.
Elliott wants individual players from the team to be able to submit this information.
Define what is meant by abstraction.
How did you do?
Give one example of how abstraction could be used when developing this program in part (a).
How did you do?
Did this page help you?
A library sorts their books based on a book code.
Show the steps that a merge sort would take to put the following list of book codes into ascending alphabetical order (from A to Z).
POE12 , BAC97 , FLY77 , JAV16 , TAL86 , AND18 , ZAR09 , HOP86
How did you do?
Explain one advantage of a merge sort compared to a bubble sort.
How did you do?
Did this page help you?
A program uses a file to store a list of words that can be used in a game.
A sample of this data is shown in Fig. 3.
|
|
|
|
|
|
Fig. 3
Show the stages of a bubble sort when applied to data shown in Fig. 3.
How did you do?
Did this page help you?
An insertion sort algorithm is used to sort a dataset of game scores from smallest to largest
game_scores = [101, 110, 130, 50, 66]
To perform an insertion sort, a count-controlled loop must be used.
Describe the purpose of the count-controlled loop and give an example of what the loop would look like.
Purpose | |
---|---|
Example |
How did you do?
Did this page help you?
Describe the steps involved in performing a bubble sort on the list in Fig. 1. Show the state of the list after each complete pass through the list.
|
|
|
|
|
|
Fig. 1
How did you do?
Did this page help you?