Hey! Sign in to get help with your study questionsNew here? Join for free to post

Computer Science AQA - programming theory questions

Announcements Posted on
Would YOU be put off a uni with a high crime rate? First 50 to have their say get a £5 Amazon voucher! 27-10-2016
    • Thread Starter

    Hello! I'm taking the paper 1 exam this Monday, I have come across some small programming issues that I don't quite understand.
    1. when inputs are evaluated as strings, '06' is considered 'alphabetically' larger than '007' (this was in the additional specimen questions). I still don't understand this? How is 06 larger than 007
    2. The definitions for this seem to vary, so does anyone know what is the actual difference between a function and a procedure/subroutine? Right now the way I differentiate them is that a function returns a value whereas a procedure doesn't and a procedure might not have any parameters?
    3. What is the equivalent of a record in python? Is this just knowing how to use external text files?
    4. What is meant by reading/writing from binary external files? I know how to do this with text files - what exactly are the binary files? The difference I learnt is that binary files contain all data types and are interpreted only by the program that created them.

    In hindsight, I am posting this far too close to the exam date so I apologize and anyone who has an answer please get back to me as soon as possible!! All help is greatly appreciated.


    1. Think of it this way. " A B C D E F G..." in terms of alphabetical sorting, you will say A is the highest value. The alphabet continues to characters such as " A B C... 0 1 2 3 4 5..." So now if we compare let's say 1 and 2, 1 is "alphabetically larger than 2 so it will output 1 is larger than two. (but numerically, 2 is larger than 1) The program converts the number into machine readable form and gives you its position in the ASCII alphabet. If you look at the ASCII table, the character 1 has a decimal-ASCII equivilant of 49 where as the character has a decimal of 50. The character A has a decimal equivilant of 65. So the lower the number, the more "alphabetic they are.

    2, A solid way of answering this question would be: A function returns a value (1 mark) where as a procedure does not HAVE TO return a value (1 Mark).

    3. A record is a user-defined data structure which don't need to have the same data type. Hence in Python these may be known as lists? More info here :http://www.thomas-cokelaer.info/tuto...tructures.html

    4. A text file has an extension of .txt and stores the content when opened can be read by a human. A binary file has an extension of .bin and stores values in machine-code (such as ASCII), if you were to store let's say the string "AQA" and then store it in a binary file and then open it using notepad.exe, you will see a bunch of 1's and 0s as opposed to a .txt file where you see "AQA".
    What you've learnt is pretty much correct!
Write a reply…


Submit reply


Thanks for posting! You just need to create an account in order to submit the post
  1. this can't be left blank
    that username has been taken, please choose another Forgotten your password?
  2. this can't be left blank
    this email is already registered. Forgotten your password?
  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
    your full birthday is required
  1. Oops, you need to agree to our Ts&Cs to register
  2. Slide to join now Processing…

Updated: June 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.

Would you rather be able to

The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.