You are in browse mode. You must login to use MEMORY

   Log in to start


In English

Created by:

0 / 5  (0 ratings)

» To start learning, click login

1 / 25


- finite - ordered - items must be of the same type

What are 3 properties of a 1-dimensional array?

Practice Known Questions

Stay up to date with your due questions

Complete 5 questions to enable practice


Exam: Test your skills

Test your skills in exam mode

Learn New Questions

Dynamic Modes

SmartIntelligent mix of all modes
CustomUse settings to weight dynamic modes

Manual Mode [BETA]

The course owner has not enabled manual mode
Specific modes

Learn with flashcards
multiple choiceMultiple choice mode
SpeakingAnswer with voice
TypingTyping only mode

MockP1 - Leaderboard

1 user has completed this course

No users have played this course yet, be the first

MockP1 - Details



183 questions
- finite - ordered - items must be of the same type
What are 3 properties of a 1-dimensional array?
BirdName = ["robin", "blackbird", "pigeon"]
How would you define an array called birdName with the contents "robin", "blackbird" and "pigeon"?
How would you return the length of the array birdName?
Assuming this table is called numbers, what would be in numbers[1,2]?
What type of array is this? quarterSales = [[100, 110], [130, 80], [90, 210], [60, 130]]
Pupil = ("John", 78, "a")
How do you define a tuple in python? create a tuple called pupil with the values "john", "78", "a"
How do you refer to the first element in the tuple called "pupil"?
Below is the declaration of a new record, how would you then refer to the surname? studentType = record integer ID string firstname string surname date dateOfBirth string class end record
- Queues - Stacks - Trees - Graphs
What are 4 examples of abstract data types?
- Printer queue - Queue of keys pressed on a keyboard
What are two real-world examples of uses of queues?
How do you add an item to the end of a queue? (code)
How do you remove the front item from the queue and return it?
How do you check if the queue is empty?
How do you check if a queue is full?
- Dynamic data structures are ones which can grow or shrink in size - They require a heap in order to work
What is a dynamic data structure and what do they require in order to work?
A list
What's an example of a dynamic data structure in python?
May grow too large and cause overflow, crashing the program
What's a downside of using a dynamic data structure?
Trying to pop from a stack which is already empty
In the context of stacks, what is underflow?
In python, how do you test if a list "myList" is empty?
In python, how do you add "123" to the end of the list "myList"?
Removes the first occurence of "item" in the list "myList"
In python, what does "myList.remove(item)" do?
In python, how do you search for "item" in the list "myList"?
In python, how do you return the length of the list "myList"?
Returns the position of "item" in the list
In python, what does "index(item)" do?
In python, how do you insert "2" at the position "7" in the list "myList"?
- A pointer to the top of the stack - A var holding the size of the array (the maximum size of the stack)
A stack can be implemented with either a dynamic or a static data structure, what two additional variables are needed if a static data structure is used?
How do you add a new item to a stack? (code)
How do you remove and return an item from a stack? (code)
Returns the top item from the stack without removing it
In the context of stacks, what does peek() do?
How do you check if a stack is empty? (code)
How do you check if a stack is full? (code)
What command would you use to 'push' an item onto the end of a stack in python?
Divide the key by the number of AVAILABLE addresses and take the remainder as the address
What is a common hashing algorithm? (explain the process, not the name)
- Dividing the item into equal parts and then adding them together to get the hash value - If it's too big to store, divide by the number of spaces in the table
What is the folding method? (hashing algorithm) and what extra step must be taken if the resulting hash is too large to store on the table?
Using the ASCII code for each character
How can you hash an alphanumeric string?
What is the ASCII value for A?
What data structure are hash tables used for the implementation of?
What data structure is this? IDs = {342: "Ellen", 634: "Jasmine", 885: "Max", 571: "Sheila"}
Adjacency matrix and adjacency list
What are the two ways of implementing a graph?
- Adjacency matrix - Distance is 2
Which implementation of a graph is this? (adjacency matrix or adjacency list?) And what is the distance from B --> D?
Write 1s instead of weights in the table
How would you alter an adjacency matrix to represent an unweighted graph?
- In a graph with lots of nodes but very few connections there is alot of wasted memory - Adjacency lists fix the issue
What is an issue with adjacency matrices? And what is an alternative which fixes this issue?
Adjacency List
What type is this?
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
What would be the order of traversal for a depth-first traversal?
1, 2, 7, 8 3, 6 9 12 4, 5 10, 11
What about in a breadth-first traversal?
- Roads between towns - Networks
What are two things graphs could be used to represent?
Left subtree -> root node -> right subtree
What order is the tree traversed in an in-order traversal?
Left subtree -> right subtree -> root node
What order is the tree traversed in a post-order traversal?
Root node -> left subtree -> right subtree
What order is the tree traversed in a pre-order traversal?
- Barcode Readers - biometric devices - sensors
Give 3 examples of automatic input devices?
Can store lots of data cheaply but is inconvenient to move around
One advantage and one disadvantage of magentic storage
Portable and cheap but small capacity and easily damaged
TWO advantages and TWO disadvantages of optical storage
They all have a way of representing 1 and 0 without power
What is a similarity between all secondary storage devices?
Camera-based scanners
What is the most reliable type of barcode reader? (use for Berlin Film Festival Tickets)
Laser scanners
What type of barcode reader is used in supermarkets?
- RFID (Radio Frequency Identification) - Passive and Active
What is the technology used for oyster cards and what are the two types?
Dog tagging
What is another use of RFID tags other than bank cards/oyster cards?
OLED is plastic so it can bend
What's the difference between LED and OLED screens?
- Thinner - Don't need backlighting - Consume less power
What are 3 advantages of OLED displays?
- they're decent quality and FAST - They use toner as ink
What's the good thing about laser printers and what type of ink do they used?
- Inkjet - Works by spraying minute dots on the page
What type of printer is very high quality and how does it work?
Moving an aileron
What is a use of an actuator in the context of a plane?
- Relatively low capacity - Expensive
Give 2 disadvantages of SSDs
Paging is fixed size (4Kb) segments, segmentation is varying length segments
What's the difference between paging and segmentation (mention exact size where necessary)
- Pages are fixed size
What is one difference between pages and segments?
To compensate for the difference in speed between the peripheral and the CPU
What is the point of a buffer (in the context of peripheral management)
At the end of each fetch-decode-execute cycle
When does the CPU check for interrupts?