100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
oxford cambridge and rsa AS Level Computer Science H046/02 Algorithms and problem solving $7.99   Add to cart

Exam (elaborations)

oxford cambridge and rsa AS Level Computer Science H046/02 Algorithms and problem solving

 3 views  0 purchase
  • Course
  • OCR
  • Institution
  • OCR

oxford cambridge and rsa AS Level Computer Science H046/02 Algorithms and problem solving

Preview 4 out of 34  pages

  • September 21, 2024
  • 34
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
  • OCR
  • OCR
avatar-seller
DistinctionGuruHuan1
Oxford Cambridge and RSA


Tuesday 21 May 2024 – Afternoon
AS Level Computer Science
H046/02 Algorithms and problem solving
Time allowed: 1 hour 15 minutes

Do not use:
• a calculator




Ocr 2024
* H 0 4 6 0 2 *




Please write clearly in black ink. Do not write in the barcodes.

Centre number Candidate number


First name(s)

Last name



INSTRUCTIONS
• Use black ink.
• Write your answer to each question in the space provided. If you need extra space use
the lined pages at the end of this booklet. The question numbers must be clearly shown.
• Answer all the questions.

INFORMATION
• The total mark for this paper is 70.
• The marks for each question are shown in brackets [ ].
• Quality of extended response will be assessed in questions marked with an asterisk (*).
• This document has 16 pages.

ADVICE
• Read each question carefully before you start your answer.




OCR is an exempt Charity
Turn over

, 2
Answer all the questions.

1 Eve enjoys playing board games. Her favourite board game is called “Pot Luck”. This has a
numbered grid of 10 squares by 10 squares. Each square has a number between 1 and 100.

Players place their game counters on square 1. A 30-minute timer is set which counts
downwards. Each player rolls two 6-sided dice and then moves their game counter that number
of squares. Some squares tell the player to pick up a card. These have instructions on, such as
„Move forward 10 spaces‟. If the player lands on one of these squares they move according to
the instruction on the card. The first player to land on square 100, is announced as the winner. If
no winner is announced before the timer runs out, then it is a draw.

(a) Eve would like to create a computerised version of this game.

(i) She has been told that she should make use of abstraction when creating the game.

Describe what is meant by the term „abstraction‟.

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..................................................................................................................................................... [2]

(ii) Give three examples of how Eve could use abstraction when creating her game.

1 .......................................................................................................................................................

..........................................................................................................................................................

2 .......................................................................................................................................................

..........................................................................................................................................................

3 .......................................................................................................................................................

..........................................................................................................................................................
[3]

(iii) Give two reasons why Eve should use abstraction when designing the game.

1 .......................................................................................................................................................

..........................................................................................................................................................

2 .......................................................................................................................................................

..........................................................................................................................................................
[2]




© OCR 2024

, 3
(b) Eve would like to break the problem down into smaller sub problems so that each sub problem
will complete one specific task.

Identify three sub problems that Eve can use in her game.

1 .......................................................................................................................................................

..........................................................................................................................................................

2 .......................................................................................................................................................

..........................................................................................................................................................

3 .......................................................................................................................................................

..........................................................................................................................................................
[3]

(c) Logical conditions are checked once a player has rolled the dice.

Describe two different logical conditions and how the result will affect the outcome of the game.

Logical Condition 1

Condition: .........................................................................................................................................

..........................................................................................................................................................

Outcome: ..........................................................................................................................................

..........................................................................................................................................................

Logical Condition 2

Condition: .........................................................................................................................................

..........................................................................................................................................................

Outcome: ..........................................................................................................................................

..........................................................................................................................................................
[4]




© OCR 2024 Turn over

, 4
2 A programmer is designing a program that will store data.

The programmer is deciding whether to store the data in a stack or a queue.

(a) Identify one similarity and one difference between a stack and a queue.

Similarity ...........................................................................................................................................

..........................................................................................................................................................

Difference .........................................................................................................................................

..........................................................................................................................................................
[2]

(b) The pseudocode function, enqueue, inserts an item into a queue.

01 function enqueue(item)
02 if tailPointer >= queue.length then
03 return false
04 else
05 queue[tailPointer] = item
06 tailPointer = tailPointer + 1
07 return true
08 endif
09 endfunction

(i) Give the name of the parameter in the function enqueue.

..................................................................................................................................................... [1]

(ii) Give the name of one global variable that is used in the function enqueue.

..................................................................................................................................................... [1]




© OCR 2024

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller DistinctionGuruHuan1. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $7.99. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

81311 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$7.99
  • (0)
  Add to cart