A-level Computing/AQA/Paper 1/Skeleton program/2023

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!

Please do not discuss questions on this page. Instead use the discussion page.

The A Level exam involving this Skeleton Program has been completed. Good luck to everyone waiting for results!

Section C Predictions
The 2023 paper 1 will contain 6 questions worth 13 marks. As long as you know the program well, this will be a walk in the park:

Here are a mock set of questions (for Python 3):

7.1 State the name of an identifier for a public method in the Dastan class [1 mark]

7.2 Explain why this method is public and not private [2 marks]

8. How many points do you lose when you choose a move from position 1, 2 and 3 in the queue? [2 marks]

9.1 Suppose you wanted to display the grid with 8 by 8 cells. What would you modify in the program? [1 mark]

9.2. State the name of an identifier for a class that inherits from another class  [1 mark]

9.3 State the name of an identifier for a private method that has three parameters (including the object parameter). [1 mark]

10.1 State the name of an identifier that is a Boolean variable [1 mark]

10.2 What is the random module used for in the pre-release? [1 mark]

11.1 State the name of a built-in function [1 mark]

11.2 What effect does the super routine in class Kotla have? [1 mark]

12. Give an example from the code of an object instantiation? [1 mark]

13. give an example and reason for the use of polymorphism in the code? [3 marks]

Answers

7.1 State the name of an identifier for a public method in the Dastan class [1 mark] PlayGame

7.2 Explain why this method is public and not private [2 marks] It allows it to be accessed from outside the class by the main functions, otherwise if it was a private method this would not be possible.

8. How many points do you lose when you choose a move from position 1, 2 and 3 in the queue? [2 marks] 1,4,7

9.1 Suppose you wanted to display the grid with 8 by 8 cells. What would you modify in the program? [1 mark] Change this line: ThisGame = Dastan(6, 6, 4) to ThisGame = Dastan(8, 8, 4)

9.2 State the name of an identifier for a class that inherits from another class [1 mark] Kotla

9.3 State the name of an identifier for a private method that has three parameters (including the object parameter). [1 mark] e.g. __CreateMoveOption

10.1 State the name of an identifier that is a Boolean variable [1 mark] e.g. GameOver

10.2 What is the random module used for in the pre-release? [1 mark] Randomly selects the move offer option

11.1 State the name of a built-in function [1 mark] eg. print, int, float, input, str

11.2 What effect does the super routine in class Kotla have? [1 mark] Can use method class in the parent class, even if overridden

12. Give an example from the code of object instantiation? [1 mark] Thisgame= Dastan(6,6,4)

Section D Predictions
Programming Questions on Skeleton Program


 * The 2023 paper 1 contains 4 questions: a 5 mark, a 9 mark question, a 10 mark question and one 13 mark question - these marks include the screen capture(s), so the likely marks for the coding will be 1-2 marks lower.
 * The 2022 paper 1 contained 4 questions: a 5 mark, a 9 mark question, a 11 mark question and one 13 mark question - these marks include the screen capture(s), so the likely marks for the coding will be 1-2 marks lower.
 * The 2021 paper 1 contained 4 questions: a 6 mark, an 8 mark question, a 9 mark question and one 14 mark question - these marks include the screen capture(s), so the likely marks for the coding will be 1-2 marks lower.
 * The 2020 paper 1 contained 4 questions: a 6 mark, an 8 mark question, a 11 mark question and one 12 mark question - these marks include the screen capture(s), so the likely marks for the coding will be 1-2 marks lower.
 * The 2019 paper 1 contained 4 questions: a 5 mark, an 8 mark question, a 9 mark question and one 13 mark question - these marks include the screen capture(s), so the marks for the coding will be 1-2 marks lower.
 * The 2018 paper 1 contained 5 questions: a 2 mark question, a 5 mark question, two 9 mark questions, and one 12 mark question - these marks include the screen capture(s).
 * The 2017 paper 1 contained 5 questions: a 5 mark question, three 6 mark questions, and one 12 mark question.

Current questions are speculation by contributors to this page.

New Move: TibbleCross
Description of problem: The program is to be extended with a new type of move called the "TibbleCross". This move can allow a piece to go up two spaces diagonally from its starting position in any direction ( NW, NE, SE, SW ).

Add this move so it appears first in the queue of moves for both players.

Select the move and test it by selecting piece "22" and then moving to row/column "44"


 * 1) creds to ella and yani

New Move: rook
Description of problem: Add a new move which moves forward until the piece hits the end of the board or hits another piece

Checking validity of a move
Description of problem: When choosing where to move a piece, you must input the start square and finish square. If a valid start square is chosen, but an invalid destination square, the program will move on without prompting the player to re-enter. Alter the code to prompt the user to re-enter the finish square until a valid square is given.

New Move: spacejump
Description of problem: Add a new move called a spacejump which moves the chosen piece to a random place on the board. It can't land on your own pieces, but everywhere else is fine. The player cannot choose where the piece will end up. The spacejump move will not be added to the queue of moves, instead a player is allowed one per game that can be used whenever they choose in lieu of a queue choice. Test by allowing player 1 to use the option from square 22 and then player 2 from square 55. Player 1 will not have the option displayed on their next turn.

UserName input
At the beginning of the game allow each user to enter their own name to be used as a replacement to "Player One" and "Player Two"

Show where the piece can move
Description of problem: At the moment when selecting a move the player is expected to remember the ways in which move can be applied. Modify the program so that, once a piece has been selected a '^' symbol appears in the squares into which that piece can be moved based on the move selected. - Resolve using method A1 specification

Any improvements would be appreciated. Sub DisplayPotentialMoves(ByVal Choice As Integer, ByVal SquareReference As Integer, ByVal CurrentPlayer As Player) Console.Write(Environment.NewLine & "  ") For Column = 1 To NoOfColumns Console.Write(Column.ToString & " ") Next Console.Write(Environment.NewLine & " ") For Count = 1 To NoOfColumns Console.Write("---") Next Console.WriteLine("-")

For Row = 1 To NoOfRows Console.Write(Row.ToString & " ") For Column = 1 To NoOfColumns Dim Index As Integer = GetIndexOfSquare(Row * 10 + Column) Console.Write("|" & Board(Index).GetSymbol) Dim PieceInSquare As Piece = Board(Index).GetPieceInSquare

If (CheckSquareIsValid(Row * 10 + Column, False) And CurrentPlayer.CheckPlayerMove(Choice, SquareReference, Row * 10 + Column)) Then Console.Write("^") ElseIf PieceInSquare Is Nothing Then Console.Write(" ") Else Console.Write(PieceInSquare.GetSymbol) End If               Next Console.WriteLine("|") Next Console.Write(" -") For Column = 1 To NoOfColumns Console.Write("---") Next Console.WriteLine Console.WriteLine End Sub

Random start queue
Description of problem: Randomize the players move queue at the beginning of the game so that the players do not start with the same queue at the beginning of every game.

Choose where to put Kotla and Mirza
Description of problem: At the beginning of the game, allow players the option to choose where they place their (Kotla and Mirza) together at the back of their side of the board. For example: Player One can place their Kotla and Mirza between (1,1) to (1,6) and Player Two can place their Kotla and Mirza between (6,1) and (6,6).

Move option offer ends turn.
Description of problem: Currently, if a player accepts the move option offer (so for example, player 1 takes the jazair offer and replaces the ryott), they then get exactly the same choices again:. This is what the Preliminary Material says will happen "Taking the move option from the offer does not count as a move" ... it is still that player's turn. However, your challenge is to change this, so it DOES count as a turn, and if they choose 9, it goes on to the next player.

Cooper and Rhys

User MoveOption Input Validation
Description of problem: Currently you can crash the game when asked to choose "use from queue (1 to 3) or 9 to take the offer" by entering non-integer input.

Validate user input forcing it to be an integer, for choosing 1, 2, 3 or 9, and, if 9 was chosen, for then choosing the move option to replace. A good way to do this is to write a method  in the   class, and call this method in , passing it the required prompt strings in the two situations where it needs to be called. The method should return the user's input. For now, I would not validate whether it is an appropriate integer, just that it is in fact an integer. To do this you will need to use, and a   loop.

- This fixes any non integer input from crashing the game in all the inputs in the game. - It also makes it so that when you input a wrong number in    "Enter the square to move to (row number followed by column number):"   to let you put it again until the correct input of the chosen move. - If you notice a mistake do fix it and if any improvements can be made, please do so :)

Create a class that inherits from the Square Class
Description of problem: You should also see that the Kotla class has some extra lines in the method. The child class can add extra attributes and methods, and can alter existing methods.

This example which is already in the code, could be used to model another subclass. For example a "portal" which automatically moves any piece which goes onto it to a certain point. Or a "booster" square which increases the player's score. I'm not sure what the exam in the summer will ask you to do, but my money is on some kind of new class, based on the Kotla model.

For now, try a "portal" class, which will be placed on square 42 for player 1 and 35 for player 2. Any of the player's own pieces which go to this square should magically move to the other player's mirza and win the game.

Potential Questions:

Make the board larger (or allow the user to set the board size).

User help / info / tutorial page.

New class to allow for saving and loading the game.

Limit the number of times the offer option can be taken in a turn.

Undo move option.

Display scores at the end.

Instead of one offer generated, generate three random offers for the user to pick from.

End the game when one person's score reaches 0 or goes negative.
.

.

..