Analysis (SQA National 5 Computing Science): Exam Questions

Exam code: X816 75

13 mins6 questions
1
3 marks

A spelling game stores 20 words. Each word has an accompanying sound file where an actor’s voice speaks the word. When the game is running the program repeats the following 20 times:

  • selects one of the 20 words

  • loads a sound file matching the selected word

  • plays the sound file through a speaker

  • asks the user to type in the word

  • compares the user’s entry to the stored word

  • informs the user if they have spelled the word correctly.

When the game is over the program displays the total number of words that have been spelled correctly by the user.

Complete the table below by identifying three processes from the above description of the game.

Input(s)

User enters the word

Process(es)

Output(s)

Play matching sound file through speaker. Display whether or not the user spelled the word correctly. Display the total number of correctly spelled words.

2
3 marks

A program is being written that will allow gamers to add money to their account using gift cards.

£25 gift card with outline of a wrapped gift box. Card number is 0976 3421 6475 4377. Dark grey background with white text and design.

The program asks the user to enter their username, their five‑character password and the gift card number. The updated balance in the user’s account is then displayed.

Input(s)

Username, password, gift card number

Process(es)

Output(s)

Display new balance

3
2 marks

A campsite booking system is being developed to calculate the cost of a stay at £35 per night, per person. The cost will be displayed to the user before they confirm the booking. The system will ask users for their name, number of people, arrival date and length of stay.

Complete the analysis below

Input

Process

Output

Cost of stay

4
2 marks

A 9-hole golf course is introducing an app to replace paper scorecards. The total score is the number of times the player hits the ball to complete all 9 holes.

Below is an example of a paper scorecard that a player has filled in.

Table of golf scores for Sanya Abioye on 25/5/2023. Scores: Hole 1-3, 2-4, 3-9, 4-4, 5-6, 6-6, 7-4, 8-5, 9-5. Total score: 46.

Complete the analysis for the app by identifying the inputs and the output.

Input

Process

Add up the scores

Output

5
1 mark

Tarvit High School is trialling a voting system to decide their representative for the pupil council. A programmer creates a voting app to allow pupils to cast their vote. The winner is displayed once voting is closed.

Tarvit High School election results: Jade Hendry 22 votes, Lisa Murphy 13, Lukasz Kowalski 19, Robert Green 21. Keyboard selection: A, B, C, or D.

Identify one process carried out by the voting app.

6
2 marks

In a flight booking app, users are asked to enter their departure airport, destination airport, departure date, return date, number of adults and number of children.

A message will then be displayed showing the total flight cost and the duration of the trip.

Describe two processes for the flight booking app.