# A-level Computing/AQA/Paper 1/Skeleton program/2025

This is for the AQA A-level Computer Science Specification.
This is where suggestions can be made about what some of the questions might be and how we can solve them.
Please be respectful and do not vandalise the page, as this would affect students' preparation for exams!

## Section C Predictions

The 2025 paper 1 will contain four questions worth 23 marks.

## Section D Predictions

Mark distribution for this year:
* The 2025 paper 1 contains 4 questions: a 5 mark, an 8 mark, a 12 mark, and a 14 mark question(s).
Mark distribution for previous years:
* The 2024 paper 1 contained 4 questions: a 5 mark, a 6 mark question, a 14 mark question and one 14 mark question(s).
* The 2023 paper 1 contained 4 questions: a 5 mark, a 9 mark, a 10 mark question, and a 13 mark question(s).
* The 2022 paper 1 contained 4 questions: a 5 mark, a 9 mark, an 11 mark, and a 13 mark question(s).
* The 2021 paper 1 contained 4 questions: a 6 mark, an 8 mark, a 9 mark, and a 14 mark question(s).
* The 2020 paper 1 contained 4 questions: a 6 mark, an 8 mark, an 11 mark and a 12 mark question(s).
* The 2019 paper 1 contained 4 questions: a 5 mark, an 8 mark, a 9 mark, and a 13 mark question(s).
* The 2018 paper 1 contained 5 questions: a 2 mark, a 5 mark, two 9 mark, and a 12 mark question(s).
* The 2017 paper 1 contained 5 questions: a 5 mark question, three 6 mark questions, and one 12 mark question.
Please note the marks above include the screen capture(s), so the likely marks for the coding will be 1-2 marks lower.
Current questions are speculation by contributors to this page.

### Modify the program so that (1) the player can use each number more than once and (2) the game does not allow repeats within the 5 numbers given

C#:
C# - DM - Riddlesdown
________________________________________________________________
In CheckNumbersUsedAreAllInNumbersAllowed you can remove the line Temp.Remove(Convert.ToInt32(Item)) around line 150
C# KN - Riddlesdown
________________________________________________________________
In FillNumbers in the while (NumbersAllowed < 5) loop, you should add a ChosenNumber int variable and check it’s not already in the allowed numbers so there are no duplicates (near line 370):
Python:
Edit FillNumbers to add a selection (if) statement to ensure that the number returned from GetNumber has not already been appended to the list NumbersAllowed.
Edit CheckNumbersUsedAreAllInNumbersAllowed to ensure that numbers that the user has inputted are not removed from the Temp list, allowing numbers to be re-used.

### Modify the program so expressions with whitespace (spaces) are accepted

C#:
Riddlesdown - KH
__________________________________________________________________
At the moment if you put spaces between your numbers or operators it doesn't work so you will have to fix that
Put remove spaces under user input
PS __________________________________________________________________
I doubt this will be a question because it could be resolved in a couple of lines
Python:
Create a function to remove spaces from the input.
datb2

### Add exponentials (using ^ or similar)

C#:
Riddlesdown - Unknown
_________________________________________________________________________
Answer:
Python:

### Allow the user to include brackets for their own order of operations

C#:
C# - AC - Coombe Wood
________________________________________________________________

### Modify the program to accept input in Postfix (Reverse Polish Notation) instead of Infix

Python:
First, ask the user to input a comma-separated list. Instead of ConvertToRPN, we call a new SplitIntoRPN function which splits the user's input into a list object.
This function splits the user's input string, e.g. "10,5,/" into a list object, e.g. ["10", "5", "/"]. It also checks that at least 3 items have been entered, and also that the first character is a digit. The function returns the list and a boolean indicating whether or not the input looks valid.
Also update RemoveNumbersUsed to replace the ConvertToRPN function with the new SplitIntoRPN function.
It may help to display the evaluated user input:
Typical game output:
datb2

### Allow the program to not stop after 'Game Over!' with no way for the user to exit.

Python:
So by adding the PredefinedTargets list to the program, it will randomly pick one of those targets, rather than re-appending 119.
C#:
Coombe Wood - AA
if (Targets[0] != -1) // If any target is still active, the game continues {

### Allow the user to quit the game

C#:
If the user types a certain word the program ends:
AA - Coombe Wood
Python:
If the user types q during the game it will end. The return statement causes the PlayGame function to exit.
datb2

### Add an item that lets you clear any target

C#:
C# - AC - Coombe Wood
________________________________________________________________
C# - KH- Riddlesdown
_____________________________________________________________________________

### Allowed numbers don’t have any duplicate numbers, and can be used multiple times

C#:
C# - KH- Riddlesdown
________________________________________________________________
In CheckNumbersUsedAreAllInNumbersAllowed you can remove the line Temp.Remove(Convert.ToInt32(Item)) around line 150
In FillNumbers in the while (NumbersAllowed < 5) loop, you should add a ChosenNumber int variable and check it’s not already in the allowed numbers so there are no duplicates (near line 370):

### Update program so expressions with whitespace are validated

C#:
C# - KH- Riddlesdown
________________________________________________________________
At the moment if you put spaces between your numbers or operators it doesn't work so you will have to fix that
Put RemoveSpaces under user input.
A shorter way
Also don’t forget to add a call to it around line 58
PS __________________________________________________________________
Alternative shorter solution:

### Implement a hard mode where the same target can't appear twice

C#:
C# - Riddlesdown
________________________________________________________________
Also, at line 355 update CreateTargets:

### Once a target is cleared, prevent it from being generated again

C#:
C# - Riddlesdown
________________________________________________________________
Next create these new functions at the bottom:
Update CreateTargets (line 366) and UpdateTargets (line 126) so that they check if the generated number is in the TargetsUsed list we made
Finally in the main game loop (line 57) you should add the check to make sure that the user has cleared every possible number

### Make the program object oriented

Answer:
import re import random import math
class Game:
class TargetManager:
class NumberManager:
class ExpressionValidator:
class ExpressionConverter:
while operators and precedence[operators[-1]] > precedence[current_operator]:
if operators and precedence[operators[-1]] == precedence[current_operator]:
class ExpressionEvaluator:
if __name__ == "__main__":

### Allow the user to save and load the game

Python:
If the user enters s or l then save or load the state of the game. The saved game file could also store MaxTarget and MaxNumber. The continue statements let the while loop continue.
Create a SaveGameToFile function:
* Targets, NumbersAllowed and Score are written to 3 lines in a text file.
* map applies the str function to each item in the Targets list. So each integer is converted to a string.
* join concatenates the resulting list of strings using a space character as the separator.
* The special code \n adds a newline character.
* The same process is used for the NumbersAllowed list of integers.
Create a LoadGameFromFile function:
* The first line is read as a string using readline.
* The split function separates the line into a list of strings, using the default separator which is a space character.
* map then applies the int function to each item in the list of strings, producing a list of integers.
* In Python 3, the list function is also needed to convert the result from a map object to a list.
* The function returns Targets, NumbersAllowed and Score.
Example "savegame.txt" file, showing Targets, NumbersAllowed and Score:
Typical game output:
datb2
Python:
This solution focuses on logging all values that had been printed the previous game, overwriting the score, and then continuing the game as before. A game log can be saved, reloaded and then continued before being saved again without loss of data.
Add selection (if) statement at the top of PlayGame to allow for user to input desired action
Change DisplayScore, DisplayNumbersAllowed and DisplayTargets to allow for the values to be returned instead of being printed.
Print returned values, as well as appending to the save file.

### Display a hint if the player is stuck

Python:
If the user types h during the game, then up to 5 hints will be shown. The continue statement lets the while loop continue, so that the player's score is unchanged.
Add a new DisplayHints function which finds several hints by guessing valid inputs.
(Optional) Update the EvaluateRPN function to prevent any division by zero errors:
Example output:
datb2

### If a player uses very large numbers, i.e. numbers that lie beyond the defined MaxNumber that aren't allowed in NumbersAllowed, the program does not recognise this and will still reward a hit target. Make changes to penalise the player for doing so.

Python:

### Do not advance the target list forward for invalid entries, instead inform the user the entry was invalid and prompt them for a new one

TBA

### Implement a menu where the user can start a new game or quit their current game

TBA

### Ensure the program ends when the game is over

TBA

### Give the user a single-use ability to generate a new set of allowable numbers

TBA

### Allow the user to input and work with negative numbers

TBA

### Increase the score with a bonus equal to the quantity of allowable numbers used in a qualifying expression

TBA

### Implement a multiplicative score bonus for each priority (first number in the target list) number completed sequentially

TBA

### If the user creates a qualifying expression which uses all the allowable numbers, grant the user a special reward ability (one use until unlocked again) to allow the user to enter any number of choice and this value will be removed from the target list

TBA

### When a target is cleared, put a £ symbol in its position in the target list. When the £ symbol reaches the end of the tracker, increase the score by 1

TBA

### Implement a victory condition which allows the player to win the game by achieving a certain score. Allow the user to pick difficulty, e.g. easy (10), normal (20), hard (40)

TBA

### Shotgun. If an expression exactly evaluates to a target, the score is increased by 3 and remove the target as normal. If an evaluation is within 1 of the target, the score is increased by 1 and remove those targets too

TBA

### Every time the user inputs an expression, shuffle the current position of all targets (cannot push a number closer to the end though)

TBA

### Sped Demon. Implement a mode where the target list moves a number of places equal to the current player score. Instead of ending the game when a target gets to the end of the tracker, subtract 1 from their score. If their score ever goes negative, the player loses

TBA

### Allow the user to save the current state of the game using a text file and implement the ability to load up a game when they begin the program

TBA

### Multiple of X. The program should randomly generate a number each turn, e.g. 3 and if the user creates an expression which removes a target which is a multiple of that number, give them a bonus of their score equal to the multiple (in this case, 3 extra score)

TBA

### Validate a user's entry to confirm their choice before accepting an expression

TBA

### Prime time punch. If the completed target was a prime number, destroy the targets on either side of the prime number (count them as scored)

TBA

### Do not use reverse polish notation

TBA

### Allow the user to specify the highest number within the five NumbersAllowed

TBA