Computing pre-release material AQA A
Computer Science and ICT discussion, revision, exam and homework help.
| Announcements | Posted on | |
|---|---|---|
| Important: please read these guidelines before posting about exams on The Student Room | 28-04-2013 | |
-
Re: Computing pre-release material AQA AWhich language are you doing ?(Original post by StackableSoup)
Could anyone please email/message the Pre-release to me? I lost mine
-
Re: Computing pre-release material AQA A
Starting to get really worried about this exam now, as you cannot re-take in the winter either.
I'm finding Hamming and Gray Code especially difficult,
would anyone care to explain Gray Code to me in simple terms? I understand that it only changes once at it increases, but how do I convert deniary/binary into gray code? -
Re: Computing pre-release material AQA AHave a look at this? http://en.wikibooks.org/wiki/A-level...on/Gray_coding(Original post by A Wise Ninja)
Starting to get really worried about this exam now, as you cannot re-take in the winter either.
I'm finding Hamming and Gray Code especially difficult,
would anyone care to explain Gray Code to me in simple terms? I understand that it only changes once at it increases, but how do I convert deniary/binary into gray code? -
Re: Computing pre-release material AQA AYou don't need to be able to convert binary to gray code, but it might ask about denary. You can normally work out what the values are by just changing one bit and seeing if it's already in the table. Here's what the values are:(Original post by A Wise Ninja)
Starting to get really worried about this exam now, as you cannot re-take in the winter either.
I'm finding Hamming and Gray Code especially difficult,
would anyone care to explain Gray Code to me in simple terms? I understand that it only changes once at it increases, but how do I convert deniary/binary into gray code?
Decimal Gray
0 - 0000
1 - 0001
2 - 0011
3 - 0010
4 - 0110
5 - 0111
6 - 0101
7 - 0100
8 - 1100
9 - 1101
10 - 1111
11 - 1110
12 - 1010
13 - 1011
14 - 1001
15 - 1000 -
Re: Computing pre-release material AQA AYou could be right but if the exam follows the same pattern as previous years it looks like:
Questions 1) - 3 marks, 2) - 4 marks, 3) - 7 marks, 4) - 7 marks and 5) - 11 marks are in Section A
Q6) - 18 marks is section B
Q7) - 15 marks is section C
and Questions 8) - 7 Marks, 9) - 8 marks, 10) - 7 marks and 11) 13 marks are section D.
Of course all of this is pure speculation. -
Re: Computing pre-release material AQA AI see what you mean.. just gotta be prepared for the worst!(Original post by sagederby)
You could be right but if the exam follows the same pattern as previous years it looks like:
Questions 1) - 3 marks, 2) - 4 marks, 3) - 7 marks, 4) - 7 marks and 5) - 11 marks are in Section A
Q6) - 18 marks is section B
Q7) - 15 marks is section C
and Questions 8) - 7 Marks, 9) - 8 marks, 10) - 7 marks and 11) 13 marks are section D.
Of course all of this is pure speculation. -
Re: Computing pre-release material AQA AI doubt it since the grid size is declared as final (as a constant etc, depending on language), unless they'd do it to catch people out who wouldn't think to change it...(Original post by RoundNRound)
I know how to alter the code to expand the grid, but could there be a question that asks the user to input what size grid they would like (when the program is running).. or is that too difficult? -
Re: Computing pre-release material AQA A
My teacher has gave us a list of 12 seperate programs, each one with an additional feature of what he thinks may come up:
Note: Each version has had previous annotations removed.
To find the changes in the code search for a # - there is usually more than 1
01 Allows lower case entry of moves
02 Stops movement out of the cavern
03 Prevents crash if letter entered for main menu
04 Catch the error caused by choosing Load game with wrong file name
05 Show other objects in a training game
06 Add an option 'Return to game' - eg. used after save game
07 Display the number of moves made - this solution is messy!
08 Add a cheat option - press c while playing to see the flask coordinates
09 Add a teleport option - if in trouble press 't'
10 Change the size of the cavern to 8 by 12 and check it all works
11 Change the number of traps to 3 - this is not as easy as it sounds
12 Change the code that checks if traps have been set off
I can post it here, if people like? If there is a way too, that is. -
Re: Computing pre-release material AQA AI've done it.. you just change the Const to Friend or something so that you can just change it in a procedure.(Original post by RoundNRound)
I know how to alter the code to expand the grid, but could there be a question that asks the user to input what size grid they would like (when the program is running).. or is that too difficult?
And just change display cavern so you have a for loop so it prints correct number of bars. -
Re: Computing pre-release material AQA AWhat language are you using?(Original post by JoeUtd)
My teacher has gave us a list of 12 seperate programs, each one with an additional feature of what he thinks may come up:
Note: Each version has had previous annotations removed.
To find the changes in the code search for a # - there is usually more than 1
01 Allows lower case entry of moves
02 Stops movement out of the cavern
03 Prevents crash if letter entered for main menu
04 Catch the error caused by choosing Load game with wrong file name
05 Show other objects in a training game
06 Add an option 'Return to game' - eg. used after save game
07 Display the number of moves made - this solution is messy!
08 Add a cheat option - press c while playing to see the flask coordinates
09 Add a teleport option - if in trouble press 't'
10 Change the size of the cavern to 8 by 12 and check it all works
11 Change the number of traps to 3 - this is not as easy as it sounds
12 Change the code that checks if traps have been set off
I can post it here, if people like? If there is a way too, that is. -
Re: Computing pre-release material AQA ABasically just like the flask or trap, I create a cell reference called sword position. and just like the others I pass it to set up game to put in a "S" in the cavern location that the program has set the sword position in. You also need a boolean variable called swordfound to indicate whether the user has the sword or not, and a monsterdead boolean variable, and you need to add these to GameData to be able to save and load everything correctly.(Original post by mujahid_e3)
what language are u doing it in?? i really like the idea of the sword, can you tell me how to do it and the concept behind it.
thanks
You need to pass the new variables to save game and load game, and edit them accordingly.
In the playgame procedure, you have a check to see whether the user is in the same cell as the flask, use the CheckIfSameCell Function for this. And if this is true then SwordFound is set to true. And you need to put this check within an if statement for SwordFound = False, because you don't want SwordFound to go back to false after it is true. And after SwordFound is true, you need to set swordposition to 0,0 so that it's not encountered again, (this is assuming you've made it so that user can't walk outside of the map)
Now you need to alter the bits where the Player and the Monster meet. What you do is add an extra layer of If Statement on the outside, so If SwordFound is true and player position is the same as monsterposition then MonsterDead is true. You need to do this where the monster is moving as well. And you only enter the monster moving or check if monsterposition is same as player position if MonsterDead is false. Since if monster is dead then you don't need to check whether player is in the same place as the monster or make the monster move.
Just create the variables as I have told you and below is the code for all of the edited procedures / functions.
Code:Structure GameData Dim TrapPositions() As CellReference Dim MonsterPosition As CellReference Dim PlayerPosition As CellReference Dim FlaskPosition As CellReference Dim SwordPosition As CellReference Dim SwordFound As Boolean Dim MonsterAwake As Boolean Dim MonsterDead As Boolean End Structure Sub Main() Dim Cavern(NSDistance, WEDistance) As Char Dim Choice As Integer Dim FlaskPosition As CellReference Dim MonsterAwake As Boolean Dim MonsterPosition As CellReference Dim PlayerPosition As CellReference Dim MonsterDead As Boolean Dim TrapPositions(NoOfTraps) As CellReference Dim SwordPosition As CellReference Dim SwordFound As Boolean Randomize() Do DisplayMenu() Choice = GetMainMenuChoice() Select Case Choice Case 1 SetUpGame(Cavern, TrapPositions, MonsterPosition, PlayerPosition, FlaskPosition, SwordPosition, MonsterAwake, True) SwordFound = False MonsterDead = False PlayGame(Cavern, TrapPositions, MonsterPosition, PlayerPosition, FlaskPosition, SwordPosition, SwordFound, MonsterAwake, MonsterDead) Case 2 LoadGame(TrapPositions, MonsterPosition, PlayerPosition, FlaskPosition, SwordPosition, SwordFound, MonsterAwake, MonsterDead) SetUpGame(Cavern, TrapPositions, MonsterPosition, PlayerPosition, FlaskPosition, SwordPosition, MonsterAwake, False) PlayGame(Cavern, TrapPositions, MonsterPosition, PlayerPosition, FlaskPosition, SwordPosition, SwordFound, MonsterAwake, MonsterDead) Case 3 : SaveGame(TrapPositions, MonsterPosition, PlayerPosition, FlaskPosition, SwordPosition, SwordFound, MonsterAwake, MonsterDead) Case 4 SetUpTrainingGame(Cavern, TrapPositions, MonsterPosition, PlayerPosition, FlaskPosition, MonsterAwake) MonsterDead = False PlayGame(Cavern, TrapPositions, MonsterPosition, PlayerPosition, FlaskPosition, SwordPosition, SwordFound, MonsterAwake, MonsterDead) End Select Loop Until Choice = 9 End Sub Sub LoadGame(ByRef TrapPositions() As CellReference, ByRef MonsterPosition As CellReference, ByRef PlayerPosition As CellReference, _ ByRef FlaskPosition As CellReference, ByRef SwordPosition As CellReference, ByRef SwordFound As Boolean, ByRef MonsterAwake As Boolean, ByRef MonsterDead As Boolean) Dim Filename As String Dim LoadedGameData As GameData Console.Write("Enter the name of the file to load: ") Filename = Console.ReadLine Console.WriteLine() FileOpen(1, Filename, OpenMode.Binary, OpenAccess.Read) FileGet(1, LoadedGameData) FileClose(1) TrapPositions = LoadedGameData.TrapPositions MonsterPosition = LoadedGameData.MonsterPosition PlayerPosition = LoadedGameData.PlayerPosition FlaskPosition = LoadedGameData.FlaskPosition SwordPosition = LoadedGameData.SwordPosition SwordFound = LoadedGameData.SwordFound MonsterAwake = LoadedGameData.MonsterAwake MonsterDead = LoadedGameData.MonsterDead End Sub Sub SaveGame(ByVal TrapPositions() As CellReference, ByVal MonsterPosition As CellReference, ByVal PlayerPosition As CellReference, _ ByVal FlaskPosition As CellReference, ByRef SwordPosition As CellReference, ByRef SwordFound As Boolean, ByVal MonsterAwake As Boolean, ByVal MonsterDead As Boolean) Dim Filename As String Dim CurrentGameData As GameData CurrentGameData.TrapPositions = TrapPositions CurrentGameData.MonsterPosition = MonsterPosition CurrentGameData.PlayerPosition = PlayerPosition CurrentGameData.FlaskPosition = FlaskPosition CurrentGameData.SwordPosition = SwordPosition CurrentGameData.SwordFound = SwordFound CurrentGameData.MonsterAwake = MonsterAwake CurrentGameData.MonsterDead = MonsterDead Console.Write("Enter new file name: ") Filename = Console.ReadLine Console.WriteLine() FileOpen(1, Filename, OpenMode.Binary, OpenAccess.Write) FilePut(1, CurrentGameData) FileClose(1) End Sub Sub SetUpGame(ByRef Cavern(,) As Char, ByRef TrapPositions() As CellReference, ByRef MonsterPosition As CellReference, _ ByRef PlayerPosition As CellReference, ByRef FlaskPosition As CellReference, ByRef SwordPosition As CellReference, ByRef MonsterAwake As Boolean, ByVal NewGame As Boolean) Dim Count As Integer ResetCavern(Cavern) If NewGame Then PlayerPosition.NoOfCellsSouth = 1 PlayerPosition.NoOfCellsEast = 1 MonsterAwake = False End If For Count = 1 To NoOfTraps SetPositionOfItem(Cavern, TrapPositions(Count), "T", NewGame) Next SetPositionOfItem(Cavern, MonsterPosition, "M", NewGame) SetPositionOfItem(Cavern, FlaskPosition, "F", NewGame) SetPositionOfItem(Cavern, PlayerPosition, "*", NewGame) SetPositionOfItem(Cavern, SwordPosition, "S", NewGame) End Sub Sub SetUpTrainingGame(ByRef Cavern(,) As Char, ByRef TrapPositions() As CellReference, ByRef MonsterPosition As CellReference, _ ByRef PlayerPosition As CellReference, ByRef FlaskPosition As CellReference, ByRef MonsterAwake As Boolean) ResetCavern(Cavern) PlayerPosition.NoOfCellsSouth = 3 PlayerPosition.NoOfCellsEast = 5 MonsterAwake = False TrapPositions(1).NoOfCellsSouth = 2 TrapPositions(1).NoOfCellsEast = 7 TrapPositions(2).NoOfCellsSouth = 4 TrapPositions(2).NoOfCellsEast = 5 MonsterPosition.NoOfCellsSouth = 1 MonsterPosition.NoOfCellsEast = 4 FlaskPosition.NoOfCellsSouth = 5 FlaskPosition.NoOfCellsEast = 6 SetUpGame(Cavern, TrapPositions, MonsterPosition, PlayerPosition, FlaskPosition, Nothing, MonsterAwake, False) End Sub Sub PlayGame(ByRef Cavern(,) As Char, ByVal TrapPositions() As CellReference, _ ByRef MonsterPosition As CellReference, ByRef PlayerPosition As CellReference, ByRef FlaskPosition As CellReference, ByRef SwordPosition As CellReference, ByRef SwordFound As Boolean, ByRef MonsterAwake As Boolean, ByRef MonsterDead As Boolean) Dim Count As Integer Dim Eaten As Boolean Dim FlaskFound As Boolean Dim MoveDirection As Char Dim ValidMove As Boolean Eaten = False FlaskFound = False DisplayCavern(Cavern, MonsterAwake) Do Do DisplayMoveOptions() MoveDirection = GetMove() ValidMove = CheckValidMove(PlayerPosition, MoveDirection) Loop Until ValidMove If MoveDirection <> "M" Then MakeMove(Cavern, MoveDirection, PlayerPosition) DisplayCavern(Cavern, MonsterAwake) FlaskFound = CheckIfSameCell(PlayerPosition, FlaskPosition) If FlaskFound Then DisplayWonGameMessage() End If If SwordFound = False Then SwordFound = CheckIfSameCell(PlayerPosition, SwordPosition) If SwordFound = True Then SwordPosition.NoOfCellsSouth = 0 SwordPosition.NoOfCellsEast = 0 End If End If If SwordFound = True And Not FlaskFound Then If Not MonsterDead Then Console.WriteLine("You have a Sword!, You can kill the Monster!") End If End If If CheckIfSameCell(PlayerPosition, MonsterPosition) = True Then If SwordFound = True Then MonsterDead = True MonsterPosition.NoOfCellsSouth = 0 MonsterPosition.NoOfCellsEast = 0 Else Eaten = True End If End If If Not FlaskFound And MonsterDead Then Console.WriteLine("You've killed the Monster, Now find the flask!") End If If Eaten Then DisplayLostGameMessage() End If If Not MonsterAwake And Not FlaskFound And Not Eaten And Not MonsterDead Then MonsterAwake = CheckIfSameCell(PlayerPosition, TrapPositions(1)) If Not MonsterAwake Then MonsterAwake = CheckIfSameCell(PlayerPosition, TrapPositions(2)) End If If MonsterAwake Then DisplayTrapMessage() DisplayCavern(Cavern, MonsterAwake) End If End If If MonsterAwake And Not Eaten And Not FlaskFound And Not MonsterDead Then Count = 0 Do MakeMonsterMove(Cavern, MonsterPosition, FlaskPosition, PlayerPosition, SwordFound) Console.WriteLine() Console.WriteLine("Press Enter key to continue") Console.ReadLine() DisplayCavern(Cavern, MonsterAwake) If CheckIfSameCell(MonsterPosition, PlayerPosition) = True Then If SwordFound = True Then Console.WriteLine("You've Killed the Monster!, Now find the Flask!") MonsterDead = True MonsterPosition.NoOfCellsSouth = 0 MonsterPosition.NoOfCellsEast = 0 Else Eaten = True DisplayLostGameMessage() End If End If Count = Count + 1 Loop Until Count = 2 Or Eaten Or MonsterDead End If End If Loop Until Eaten Or FlaskFound Or MoveDirection = "M" End Sub End Module -
Re: Computing pre-release material AQA APython 3(Original post by 101101)
What language are you using? -
Re: Computing pre-release material AQA AWhat it be possible to upload the cheat program and the teleport one>?(Original post by JoeUtd)
Python 3 -
Re: Computing pre-release material AQA Aa Try Catch Question wont come up as us pascal users dont have them functions(Original post by alphadawg)
I don't think it matters how good you are, you just need to know the basic programming concepts and some functions. I think one of the most advanced they'd ask you to program is probably Try Catch.
I don't think anything particularly complicated will come up, because I think in each question the code will be limited to a particular sub procedure or function. -
Re: Computing pre-release material AQA AYeah, for COMP1 there isn't too much to revise. As long as you've been paying attention to how it all works in class all year and have a good logical brain you should be able to get a decent grade.(Original post by JoeUtd)
I've really neglected the entire Computing course in my revision... exam is on Friday.
Think I can cram everything in this week and get a decent grade for this? -
Re: Computing pre-release material AQA ASurely you have an alternative? Like for making sure a file name exists when loading?(Original post by Pyro2000x)
a Try Catch Question wont come up as us pascal users dont have them functions
wouldn't it be 8, 7, 13 for section D?