AQA Computing COMP1 (Unit 1) Exam 25th May (June) 2012
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: AQA Computing COMP1 (Unit 1) Exam 25th May (June) 2012Or if you used c# or vb.net you could have used System.Math.Abs to get the absolute value :3 gotta love the inbuilt functions(Original post by moorbre)
I wouldn't have mattered if you had dealt with the negative, so you have lost marks for that, not sure how many.
you could have dealt with the negative by squaring the result ( so its always positive ) and square root it.
Or like i did, work out which was a larger value ( PlayerPosition or MonsterPosition ) and take away the smaller one away from the larger one.
EDIT: Sorry didn't read previous posts, just saw this has been said already ._.
The squaring thing is clever though btw
Last edited by pixelfrag; 26-05-2012 at 19:49. -
Re: AQA Computing COMP1 (Unit 1) Exam 25th May (June) 2012
kk thanks for the responses, hopefully i can get the majority of the marks coz at the end of the day the question was testing you could create/call a function and pass variables as parameters.
By the way when it said additional marks will be awarded for good programming style, does that mean u can get extra marks on top of the maximum mark for the question or are the marks part of the 13 mark question ? -
Re: AQA Computing COMP1 (Unit 1) Exam 25th May (June) 2012You won't get extra marks on top of the question mark. It just means that for the 13 marks they want to see things like no global variables, parameter passing, no GoTo statements, etc.(Original post by Bavsterx1495)
kk thanks for the responses, hopefully i can get the majority of the marks coz at the end of the day the question was testing you could create/call a function and pass variables as parameters.
By the way when it said additional marks will be awarded for good programming style, does that mean u can get extra marks on top of the maximum mark for the question or are the marks part of the 13 mark question ? -
Re: AQA Computing COMP1 (Unit 1) Exam 25th May (June) 2012
I spent a bit long on the theory and so was a tad rushed in the programming but it wasn't too bad. In the last one I used a procedure as opposed to a function because I thought the wording of the question was suggesting this and also the identifier was CalculateDistance which is a command and doesn't suggest that the subroutine should return a value. It doesn't sound like something you should lose marks for but I thought a function might be more appropriate.
I am a bit nervous now because they always seem to have a trace in Comp1 and I don't remember doing one - if someone could confirm whether there was one or not it would really help me relax
-
Re: AQA Computing COMP1 (Unit 1) Exam 25th May (June) 2012lol there was no trace table question dw(Original post by sAuhsoj)
I spent a bit long on the theory and so was a tad rushed in the programming but it wasn't too bad. In the last one I used a procedure as opposed to a function because I thought the wording of the question was suggesting this and also the identifier was CalculateDistance which is a command and doesn't suggest that the subroutine should return a value. It doesn't sound like something you should lose marks for but I thought a function might be more appropriate.
I am a bit nervous now because they always seem to have a trace in Comp1 and I don't remember doing one - if someone could confirm whether there was one or not it would really help me relax
-
Re: AQA Computing COMP1 (Unit 1) Exam 25th May (June) 2012Actually I think calculatedistance does sound like it should return a value, it makes more sense to do:(Original post by sAuhsoj)
I spent a bit long on the theory and so was a tad rushed in the programming but it wasn't too bad. In the last one I used a procedure as opposed to a function because I thought the wording of the question was suggesting this and also the identifier was CalculateDistance which is a command and doesn't suggest that the subroutine should return a value. It doesn't sound like something you should lose marks for but I thought a function might be more appropriate.
I am a bit nervous now because they always seem to have a trace in Comp1 and I don't remember doing one - if someone could confirm whether there was one or not it would really help me relax
Dim distance as integer = calculatedistance(monsterpositio n, playerposition)
rather than calculatedistance(monsterpositio n, playerposition) -
Re: AQA Computing COMP1 (Unit 1) Exam 25th May (June) 2012thank you, that's a load off my mind
I worded that badly, of course it needs to return a value but I used a variable parameter to do so using a local variable, whose value was the distance, in PlayGame(), calculated by the procedure.(Original post by pixelfrag)
Actually I think calculatedistance does sound like it should return a value, it makes more sense to do:
Dim distance as integer = calculatedistance(monsterpositio n, playerposition)
rather than calculatedistance(monsterpositio n, playerposition)
eg
and then concatenated that value into the Console.WriteLine() statement.Code:CalculateDistance(DistanceFromMonster, MonsterPosition, PlayerPosition)
Personally, I don't think it should matter and a function would have made more sense but I think the question was worded ambiguously.
Also, to clarify, my point about the identifier was that procedures tend to have imperative (command) identifiers such as DisplayMenu whereas function identifiers typically sound like variable identifiers which reflects the meaning of the value returned as opposed to an action that the function carries out eg MonthName, or DateDiff. However, the user-defined function identifiers in the skeleton program don't seem to follow this convention so maybe that was irrelevant. -
Re: AQA Computing COMP1 (Unit 1) Exam 25th May (June) 2012Ahh I see i see. Well tbh the skeleton code was coded really poorly lol, maybe because they didn't want to give away the best programming practices that could be observed and re-used in the answers, hmm.(Original post by sAuhsoj)
thank you, that's a load off my mind
I worded that badly, of course it needs to return a value but I used a variable parameter to do so using a local variable, whose value was the distance, in PlayGame(), calculated by the procedure.
eg
and then concatenated that value into the Console.WriteLine() statement.Code:CalculateDistance(DistanceFromMonster, MonsterPosition, PlayerPosition)
Personally, I don't think it should matter and a function would have made more sense but I think the question was worded ambiguously.
Also, to clarify, my point about the identifier was that procedures tend to have imperative (command) identifiers such as DisplayMenu whereas function identifiers typically sound like variable identifiers which reflects the meaning of the value returned as opposed to an action that the function carries out eg MonthName, or DateDiff. However, the user-defined function identifiers in the skeleton program don't seem to follow this convention so maybe that was irrelevant.
Also, what did you put for the questions asking as to why never to use global vars in sub-procedures? -
Re: AQA Computing COMP1 (Unit 1) Exam 25th May (June) 2012From my notes:(Original post by pixelfrag)
Ahh I see i see. Well tbh the skeleton code was coded really poorly lol, maybe because they didn't want to give away the best programming practices that could be observed and re-used in the answers, hmm.
Also, what did you put for the questions asking as to why never to use global vars in sub-procedures?
- Makes subroutines independent of the program
- Can reuse the same identifier in different parts of the program
- Saves memory space
- Good OOP practice (data encapsulation - the wrapping of private data in classes)
I gave the first two as my answers.
While we are on the topic, you may be interested in my notes for Comp2. http://goo.gl/uSQ5U
They don't cover everything as I also have notes on paper - but you may find them useful. -
Re: AQA Computing COMP1 (Unit 1) Exam 25th May (June) 2012Thank you, you might find these useful too: http://www.pixelfrag.com/revision/CO...NEW%20SPEC.pdf(Original post by sAuhsoj)
From my notes:
- Makes subroutines independent of the program
- Can reuse the same identifier in different parts of the program
- Saves memory space
- Good OOP practice (data encapsulation - the wrapping of private data in classes)
I gave the first two as my answers.
While we are on the topic, you may be interested in my notes for Comp2. http://goo.gl/uSQ5U
They don't cover everything as I also have notes on paper - but you may find them useful. -
Re: AQA Computing COMP1 (Unit 1) Exam 25th May (June) 2012
Where I think I lost a nark - in section B, i used (forgotten what variable it was called, i will use x) x>=1 rather than !(x<1) (thats how u write it in java anyway). I think i also might have lost a mark in local variables vs global ones, and I almost failed the last question -I fixed it in the end, but was stuck for ages trying to work out why what i did was wrong. But i did finish it in the end, and I think i have done fine.
-
Re: AQA Computing COMP1 (Unit 1) Exam 25th May (June) 2012As long as it worked you shouldn't have lost that first mark(Original post by NightStrider)
Where I think I lost a nark - in section B, i used (forgotten what variable it was called, i will use x) x>=1 rather than !(x<1) (thats how u write it in java anyway). I think i also might have lost a mark in local variables vs global ones, and I almost failed the last question -I fixed it in the end, but was stuck for ages trying to work out why what i did was wrong. But i did finish it in the end, and I think i have done fine.
-
Re: AQA Computing COMP1 (Unit 1) Exam 25th May (June) 2012
Took the papaer in pascal, the last question i did something along the lines of:
playerposition - monsterposition, and i remember getting a negative outcome
so i just did:
if distancefrommonster < 0 then
distancefrommonster := distancefrommonster * -1
the last screen shot i took accutally showed an in correct result, but ^ that sure fixed the negative numbers
hope i get some marks from a "try" at it
-
Re: AQA Computing COMP1 (Unit 1) Exam 25th May (June) 2012
Hey guys, I have a quick question for anyone who took the exam in Pascal, for Question 6, 16) (The Binary to decimal conversion) pseudo code, did the code they gave you error to you at all?
After writing it out in Pascal, the variables they gave you in the table didn't work. After running it it gave me and some others in my class an error around the following :After changing it from an integer to a double it worked, but then again was wrong because we didn't use 'Integer' which is what they had told us to use?'Extended found, expecting SmallInt'
Just wondered if anyone had the same problem, spent alot more time than I should have on that section because of that.. -
Re: AQA Computing COMP1 (Unit 1) Exam 25th May (June) 2012After a lot of thought yeah I did try the second one (DIV) and it did work, but I never knew there was any difference between the two :s(Original post by TipTapToe)
^
Did you do:
A:= B / C;
or
A:= B DIV C;
with the second one A could be an integer. -
Re: AQA Computing COMP1 (Unit 1) Exam 25th May (June) 2012I believe DIV is whole number division (basically, without the decimal / fraction)(Original post by andymanitara)
After a lot of thought yeah I did try the second one (DIV) and it did work, but I never knew there was any difference between the two :s
Eg, 11/3 would become 3, not 3.6 or whatever it is.
Its basically the opposite to MOD.
DIV is also the same as \