WorksheetsPrinciples of Computer Science
Total questions: 110
Worksheet time: 1hrs 19mins
Define ABSTRACTION
Breaking a task into smaller tasks.
Drawing a map to show how to reach a destination.
Creating step by step instructions.
Focusing on what is important and ignoring what is unnecessary.
Define PATTERN RECOGNITION.
A sequence of instructions.
Looking for similarities and trends.
Breaking a task into smaller tasks.
Focusing on what is important and ignoring what is unnecessary.
Define ALGORITHM DESIGN
Breaking a task into smaller tasks.
Looking for similarities and trends.
A sequence of instructions.
Deciding what computer to use.
What is the OUTPUT if the user enters "YES"?
Leave umbrella at home.
Take an umbrella.
Which of these is an example of decomposition?
Watching a mechanic repair a car
Finding out how a car works by looking in detail at the different parts that make up the car
Looking at different car models for similarities between them
Why do we need to look for patterns in problems?
Patterns make it easier for us to solve complex problems
We don't need to look for patterns
Patterns make it more difficult complex problems
You are building a calculator program that will take in a first number, a second number, add them together and display a result. You need to identify the parts of your system. Identify your two inputs.
Calculator
First number
Display
Second number
Result
You are building a calculator program that will take in a first number, a second number, add them together and display a result. You need to identify the parts of your system. Identify your key processes.
Input a first number
Input a second number
Display a result
Add two numbers together
When a program repeats, looping over the same sequence, it is called...
iteration
a variable
an instruction
Instructions carried out one after another in order is a...
List
Sequence
Collection
Series
Which is the definition of "sequence"?
A set of instructions in a specific order
Where instructions repeat
Code where decisions are made
Which is the definition of "selection"?
A set of instructions in a specific order
Where instructions repeat
Code where decisions are made
What is pseudocode?
A way of describing a set of instructions in text form
A specific programming language that all computers use
A diagrammatic representation of a set of instructions
What is a CHAR datatype?
A datatype that can hold any single character.
A datatype that can hold only numbers.
A datatype that can be ignored.
A datatype that can fit 7.
What is a STRING datatype?
It can store a sequence of numbers.
It can store a sequence of characters.
It can store a sequence of letters.
All of the above.
DISPLAY (17 MOD 5)
0
1
2
4
5
DISPLAY (17 MOD 6)
0
1
2
4
5
DISPLAY (17 MOD 2)
0
1
2
4
5
A variable is a location in the computer’s memory to hold a piece of data.
TRUE
FALSE
A variable must be named and assigned a datatype in strict programming languages.
TRUE
FALSE
The variable StudentID holds a combination of letters and numbers (e.g.BA001). The datatype of the variable is string.
TRUE
FALSE
Which of the following usees FIFO method
Queue
stack
linklist
binary tree
This form of access is used to add and remove nodes from a queue.
LIFO, Last In First Out
FIFO, First In First Out
Both a and b
none
Which of the following languages is object oriented?
C
C++
BASIC
Pascal
What are the building blocks of a procedural program?
Objects and Classes
Variables and methods
Procedures and Functions
All of the above
Variables declared outside a function and they can be accessed by any function in the program are..
State Variables
Local Variables
Global Variables
Re-usable Variables
The three types of control structures are
sequential, selection and flexible
sequential, flexible and variable
sequential, selection and repetition
flexible, selection and repetition
Examples of Boolean Operators include
AND (&&)
OR (||)
NOT (!)
All of the above
When pressed, what will a button immediately cause in an event driven language?
Code to be run
Changes to the environment
The user will make a choice and interact with the application
An event to be triggered
What does HTML stand for?
Hypertext Making Language
Hyper Transfer Markup Language
Hypertext Markup Language
Hyper Transfer Making Language
The <p> tag marks what type of content?
paragraph
heading
hyperlink
picture
Which of these tags mark content with emphasis? (choose 2)
<strong></strong>
<em></em>
<br></br>
<hr></hr>
<p></p>
Which tag is used to create a hyperlink on a web page?
<a>
<link>
<hr>
<img>
Which attribute contains the URL to a linked web page?
href
type
src
name
The <ol> tag is used to mark what type of content?
a numbered list
a bulleted list
an image
a cell in a table
The <ul> tag is used to mark what type of content?
a bulleted list
a numbered list
a line break
a hyperlink
The <img> tag is used to mark what type of content?
graphics
video
hyperlinks
data tables
CSS stands for cascading ________ sheets.
service
style
setup
security
Which tag is used to indicate that everything within them will be visible on the page?
meta
html
img
body
Which of the following is correct for the GET method?
It requests a representation of the specified resource. Requests using it should only retrieve data.
It is used to submit an entity to the specified resource, often causing a change in state or side effects on the server.
It establishes a tunnel to the server identified by the target resource.
It is used to apply partial modifications to a resource.
Which of the following is correct for the POST method?
It requests a representation of the specified resource. Requests using it should only retrieve data.
It is used to submit an entity to the specified resource, often causing a change in state or side effects on the server.
It asks for a response identical to that of a GET request, but without the response body.
It is used to apply partial modifications to a resource.
Firewalls provide protection against outside attackers by shielding your computer or network from malicious or unnecessary network traffic
True
False
What is encryption?
Data is altered to make it easy to read
Transforms data to make it easier to enable hackers to access it
Transform data from one form into another
Data is altered to prevent people from reading it
Original data ready to be encrypted is called
Plaintext
Ciphertext
Cipher
Key
Hashing is ...
The interception of a key that is used to decrypt data
The transformation of a string of characters into a fixed length value or key that represents the original input string
When data from a database is mismanaged
When minor changes in the original string can completely change the hash value
Hashing is ...
Changes data before it reaches the spreadsheet records to be compared to
Is very secure
Is not very secure
Changes data before it reaches the database records to be compared to
Hashing ...
Changes data before it reaches the spreadsheet records to be compared to
Never stores sensitive data as plain text
Is not very secure
Stops hackers being able to see data and they will only see the hashed values
How many times will "Hi" be printed to the console?
1
2
3
What will be printed to the console by this code?
"B", "C", "D"
"A", "B", "C", "D"
"A", "B", "C"
"A", "C", "D"
What will the value of x be AFTER this code is run?
4
2
3
6
What will be printed to the console when this code is run, if the user enters 12?
"Jan"
"Jan", "Feb", "Mar"
"Jan", "Mar"
"Feb", "Mar"
What will be printed to the console when this code is run?
"Yay!", "Boo", "Yippee"
"Yay!", "Yippee"
"Boo", "Yippee"
"Yippee"
