0% found this document useful (0 votes)
24 views6 pages

Year 11 Computer Science - 24.25 - T4.1 AP1 - Problem Solving and Algorithms

The document outlines a Year 11 Computer Science assessment focused on problem-solving and algorithms, covering topics such as flowcharts, searching algorithms, sorting algorithms, decomposition, abstraction, and debugging techniques. It includes tasks related to linear and binary searches, bubble sort, and recursive algorithms, as well as practical applications like calculating averages and managing seat bookings. The assessment consists of various questions with a total of 56 marks available.

Uploaded by

amir.pezeshkian1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views6 pages

Year 11 Computer Science - 24.25 - T4.1 AP1 - Problem Solving and Algorithms

The document outlines a Year 11 Computer Science assessment focused on problem-solving and algorithms, covering topics such as flowcharts, searching algorithms, sorting algorithms, decomposition, abstraction, and debugging techniques. It includes tasks related to linear and binary searches, bubble sort, and recursive algorithms, as well as practical applications like calculating averages and managing seat bookings. The assessment consists of various questions with a total of 56 marks available.

Uploaded by

amir.pezeshkian1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Year 11 Computer Science

T4.1 AP1: Problem Solving and Algorithms

Flowcharts and Searching: (10 marks)

(a) Using the correct symbols, draw a flowchart that takes a number as input and prints
whether the number is odd or even.

(a) Explain the difference between a linear search and a binary search.

In a binary search you will need a data that is sorted, however in a linear data
You don’t reqayer that

(b) State which search algorithm is more efficient for a sorted list and explain why.

In my opinion a binary search is the most


effective search because its one of the main
ones which requires a sorted list of
Trace an Algorithm: (2 marks)

The following pseudocode takes a list of numbers as input and sorts them using the
bubble sort algorithm:

css
Copy code
for i = 0 to length(list) - 1
for j = 0 to length(list) - i - 1
if list[j] > list[j + 1] then
swap list[j] and list[j + 1]
end if
next j
next i

(a) Explain the purpose of the algorithm.

Decomposition and Abstraction: (4 marks)

(a) Define decomposition in the context of problem-solving.

Decomposition is when you break down a


sentence problem and reorganize it step by
step to solve the problem
(b) Define abstraction in the context of problem-solving.

In an abstraction you remove a certain problem


from the list so you can solve the main problem
easier
Problem-Solving Techniques: (4marks)

Selection and Iteration


(a) Describe the difference between selection and iteration in programming.

In programming the difference between


selection and iteration is that selection choices
the path of the program while iteration repeats
the code.

Input, Output, and Processing: (8 marks)

A school wants to create a program that calculates the average test score for a class of
students.

(a) Write a written description algorithm to show this. The program should:

• Take the number of students and their test scores as input.


• Output the average score.

Input=number
Print(“ please enter the number you want to
add”)
Output=the answer

(b) Modify the algorithm to also find and print the highest score.
Identifying Errors in Algorithms: (6 marks)

The following pseudocode is intended to calculate the factorial of a number, but it contains
an error:

css
Copy code
factorial = 1
for i = 1 to n do
factorial = factorial + i
next i

(a) Identify the error in the pseudocode.

(b) Correct the pseudocode so that it calculates the factorial of n correctly.

Recursive Algorithms: (2 marks)

(a) Explain what a recursive algorithm is.

It’s similar algorithm as decomposition witch its


break down to solve the answer
Practical Problem-Solving: (4 marks)

Algorithm Optimisation

You are given the following algorithm that finds the sum of all even numbers in a list:

typescript
Copy code
total = 0
for each number in list
if number mod 2 = 0 then
total = total + number
end if
next number

(a) Suggest a way to optimise (make better) this algorithm to improve its performance.

(b) Explain your optimisation.

Real-World Problem Solving: (8 marks)

A cinema needs a system to allocate seats to customers based on their booking. The system
should prevent double-booking of any seat.

(a) Describe how you would decompose this problem into smaller, manageable tasks.
(b) Write a planning of a code for the system that allows customers to: book seats,
checks seat availability, and prevents double-booking.

Debugging and Testing: (8 marks)

A student wrote an algorithm to find the average temperature over 7 days, but the
algorithm keeps producing incorrect results.

(a) Outline a systematic approach to debugging the algorithm.

(b) Describe two different types of tests you could perform to ensure the program works
correctly.

Total marks for paper = 56 marks

You might also like