You are Here: Home

# OCR AS-Level Computer Science - 14/06/16 - Paper 2 [Exam Discussion]

Announcements Posted on
TSR's new app is coming! Sign up here to try it first >> 17-10-2016
1. (Original post by neon_reaper)
Does anyone know if we're alright to write algorithms and pseudocode in pencil? And yeah all of the software development is mentioned on the spec but theres no questions on it in our spec paper (but there is one in the A2 paper) and i think it came up very rarely in past papers
Im pretty sure they have to be in pen, the scanners for the papers won't pick up pencil
2. (Original post by edexcelruinedme)
Im pretty sure they have to be in pen, the scanners for the papers won't pick up pencil
Okay thanks. Mines gonna have a lot of crossing out :/
3. The codes are gonna rek me xD
4. Just a note to anyone who is self teaching from the book like me / anyone else who didn't realise:

Line 4 of the binary search pseudocode on page 50 says: WHILE Found==False AND LowerBound != UpperBound
This is incorrect and will cause your program to have big inconsistencies / makes it much harder to follow a binary search on paper. The line should read:
WHILE Found==False AND LowerBound <= UpperBound.

Take the example in the book; a list with 15 elements (letter A through to O). If you search for E, on the 3rd iteration the UpperBound and LowerBound will be at the same position (4) , which is where "E" is located. However, using the book's code, we will never have this position returned to us because the while loop is broken now that UB/LB are equal to each other, meaning a new midpoint is not created and found remains false (the output will be "Item is not in list" )
By using LowerBound <= UpperBound, the program will still divide and round the UB and LB when they are equal to each other and will return a midpoint of 4 which equals "E", meaning found will be True and we will get the position outputted to us.

I have tested the book's version/example and while SOME of the elements returned fine using !=, when it came to searching for E and most of the middle elements (where LB/UB are likely to be at the same position) it said the element was not in the list. So remember its better to use <= in the while condition!

I also had issues when programming the book's sorting algorithm (FOR position = 0 TO listlength -2 did not work; it should be listlength - 1) and the insertion sort pseudocode really confused me; how can it say "While there is an item to the left of it which is SMALLER than itself, swap with that item"? Surely it should read "larger than itself" as we want the largest elements at the end of the list?

The authors took these pseudocode examples from a website called BionicRobot; either the website belongs to one of them or they just copied the pseudocode without bothering to check it was correct. Hope everyone's getting on alright with their revision.
5. (Original post by PYDogVan)
I also had issues when programming the book's sorting algorithm (FOR position = 0 TO listlength -2 did not work; it should be listlength - 1) and the insertion sort pseudocode really confused me; how can it say "While there is an item to the left of it which is SMALLER than itself, swap with that item"? Surely it should read "larger than itself" as we want the largest elements at the end of the list?
.
This depends on the programming language you use really, since it implies that the list is zero indexed, it is correct (since in bubble sort, you dont need to check the very last item of a list). For languages like python, its listlength -1 because of the way it does the for loop (in python, the for loop it done like this: ... for i in range(0, the number you chose subtract 1)
6. (Original post by blankboi)
This depends on the programming language you use really, since it implies that the list is zero indexed, it is correct (since in bubble sort, you dont need to check the very last item of a list). For languages like python, its listlength -1 because of the way it does the for loop (in python, the for loop it done like this: ... for i in range(0, the number you chose subtract 1)
Thanks a lot for clearing that up for me.
7. Thanks!! These are great
8. Good luck, everyone!
9. (Original post by SelfishWeiner)
Good luck, everyone!
I'm personally predicting a hilter reaction video after this exam, anyway good luck all!
10. Welp, off to school now, good luck to everyone :P
11. Very good paper! Felt the first question and the second were the hardest. Apart from them, very generous
12. I didn't understand what the first question was asking, then afterwards my mate said it was about iteration sequence and selection and I'm mad because I know what they are I just didn't understand the wording of the question (((
13. (Original post by robayyt)
I didn't understand what the first question was asking, then afterwards my mate said it was about iteration sequence and selection and I'm mad because I know what they are I just didn't understand the wording of the question (((
I put conditional for selection even though they are the same thing but it's ocr so i probably dropped a mark there as well .

For the rest of the paper it was relatively straight forward perhaps the bubble sort and stack algorithms may have been a little messy but overall good paper.
14. (Original post by Psraim)
There was no bubble sort?
Sorry meant binary search :/
15. What is whitebox testing?
16. This is testing done by a developer of the program where they understand the application of the code and can see the source code while testing it. Usually at lower levels of Development.
17. Ahh i must have missed that out when i was revising.

For the construct question, i gave examples in pseduocode. I didnt know if they wanted me to explain or show. What did you put?
18. (Original post by smackitintheair)
Ahh i must have missed that out when i was revising.

For the construct question, i gave examples in pseduocode. I didnt know if they wanted me to explain or show. What did you put?
I uses psuedocode as well and it seems a lot of people were confused by the wording of this question, which i can definitely understand. Im not really sure if it was supposed to be in psuedocode, but i cant see that it would be marked incorrectly if they were correct examples
19. After moaning like an ass after the first paper OCR have gone up in my estimation. I missed the write to file procedure question (my own fault for not revising properly) and the one where you have to put whether the heater is on or off which confused the hell out of me and I also know I messed up the stack question completely but again my own fault for not revising that more and for bad time management. On the whole though a very decent paper.

How I wish the first paper had contained less code and more technical stuff. Best of luck to all; next step thinking about the blasted project >.<

## Register

Thanks for posting! You just need to create an account in order to submit the post
1. this can't be left blank
2. this can't be left blank
3. this can't be left blank

6 characters or longer with both numbers and letters is safer

4. this can't be left empty
1. Oops, you need to agree to our Ts&Cs to register

Updated: September 4, 2016
TSR Support Team

We have a brilliant team of more than 60 Support Team members looking after discussions on The Student Room, helping to make it a fun, safe and useful place to hang out.

This forum is supported by:
Today on TSR

### How does exam reform affect you?

From GCSE to A level, it's all changing

Poll
Useful resources