You are Here: Home

# Computer Science AQA - programming theory questions watch

1. 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.
2. Hi.

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!

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:
Updated: June 4, 2016
Today on TSR

### Buying condoms for the first time - help!

Discussions on TSR

• Latest
Poll
Useful resources

Can you help? Study Help unanswered threadsStudy Help rules and posting guidelines

## Groups associated with this forum:

View associated groups
Discussions on TSR

• Latest

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