Font size
WorksheetsGCSE Computer Science Easter Recap
Total questions: 80
Worksheet time: 1hrs 20mins
Integrated Development Environment known as a software application that provide comprehensive facilities to computer programmers for software development. True or false?
True
False
What does IDE stand for?
Intelligent Development Environment
Integrated Design Environment
Intelligent Development Environment
Integrated Development Environment
How many of the following are features that could be found in an IDE?
Code Editor
Image Editor
Libraries
Translator
Putting commands in correct order so computers can read the commands
loop
repeat
debugging
sequencing
Finding similarities and differences between parts of a problem is known as ____________.
Pattern recognition
Decomposition
Algorithm design
Abstraction
What would you store using the Char data type?
A cartoon character such as Daffy Duck
A string such as PIG
An integer such as 17
A single character such as T
Choose all that are iteration
For z = 1 to Pigs.length - 1
Print(Pig(z))
Next
Do While Pigs(z) <> "grunter"
Print(Pig(z))
z += 1
Loop
If Pigs(z) = "scratcher"
Print("found")
End If
Pigs(z + 1) = console.readline()
How do we get user input from the keyboard?
input = (What is your name?)
input = What is your name?
output = ("What is your name?")
input("What is your name? ")
What does the print command do?
Outputs a hard copy of a program to a printer
Outputs a message on screen
Print a hard copy of a flow chart to a printer
Prints out the the commands line by line on the screen
What symbol must you place at the end of an if statement?
)
:
;
}
What is an indentation in Python?
A line of code that returns a value
A subroutine
A block of code that creates a variable
A code block (body of a function, loop etc.) starts with indentation and ends with the first unintended line.
5 >= 5
True
False
How do you write an 'else if' in Python?
elseif
elif
elife
else
what does != mean
not
swap value
not equal
equal
What will this code print?
access denied
access granted
error
password
With a NOT operator...
The condition must be true
The condition must be false
Either condition must be true
All conditions must be true
With an AND operator...
Both conditions must be false
Either condition must be true
Both conditions must be true
Both numbers are added together
With an OR operator...
Both conditions must be true
Either, not both, conditions must be true
Either or both conditions must be false
Either or both conditions must be true
What is the maximum number of states that can be represented by a binary pattern of 8 bits?
128
256
1024
512
How do computers represent and manipulate signed integers using two's complement?
Leave the binary representation unchanged
Subtract 1 from the binary representation
Add 1 to the binary representation
Invert all the bits and add 1
What is the unit of data storage that is equivalent to 1024 bytes?
Tebibyte
Mebibyte
Kibibyte
Gibibyte
What is the purpose of data types in programming?
Data types are used to determine the color of text in programming
Data types in programming are used to define the type of data that a variable can hold.
Data types are used to define the size of images in programming
Data types are used to control the speed of animations in programming
How are arrays used in programming?
Arrays are used to perform mathematical operations in programming.
Arrays are used to store only one value in programming.
Arrays are used to create loops in programming.
Arrays are used to store multiple values of the same data type under a single variable name in programming.
What is the syntax for declaring an integer variable in Python?
int variable_name = 0
variable_name = 0
variable_name = '0'
variable_name == 0
How can you access elements in an array?
array.at(index)
array[index]
array{index}
array[element]
Which of the following is a valid way to start a for loop in Python?
for i = 0; i < 10; i++:
for(i = 0; i < 10; i++):
for i in range(10):
for i in 10:
"An organised collection of data values, the relationships among them, and the operations that can be applied to the data"
Data structure
Variable
Program
Function
Correct code to define a list in Python?
scores = [15, 29, 4, 50]
scores = {15, 29, 4, 50}
Int[] scores = {15, 29, 4, 50};
scores = (15, 29, 4, 50)
Choose all the ways in which a Python list is different from an array ...
Arrays have fixed length: Lists have dynamic length
Arrays only contain one data type; Lists can contain many data types
Arrays are indexed from 1; Lists are indexed from 0
Arrays can not be empty; Lists can be empty
Output is ...?
mango
pear
kiwi
['apple','banana','pear']
Choose three valid methods that may be applied to lists in Python ...
list.append(x)
list.count(x)
list.sort()
list.format()
list.isNumeric()
Correct code to access the score 47 in this 2-D list?
scores[1]
scores[1][2]
scores[2][3]
scores[47]
Example of ... ?
Slicing
Indexing
Appending
Concatenating
Example of ... ?
Indexing
Appending
Slicing
Concatenation
Mode in the following program to open file for writing in a mode where new data will be added at the end of old data
file =open("poem.txt","__")
r
w
a
r+
Choose the correct statement to close a file stream named myfile:
myfile.terminate()
myfile.end()
myfile.close()
myfile.remove()
Which function read single line at a time?
read()
read(n)
readline()
readlines()
Which function is used to write multiple lines in text file?
write()
writelines()
lines()
print()
What does the 'R' parameter signify when opening a file in Python?
Read mode
Binary mode
Write mode
Append mode
In what way is a constant different from a variable?
It can not change its value during program execution
It can store more than one value
It can only be used in the global scope
Its name must be written in UPPER CASE
The process of giving a value to a variable?
Assignment
Initialisation
Coercion
Declaration
Choose all the recognised control structures in a computer program ...
Sequence
Selection
Iteration
Duplication
Which of the following command is used to open a file “c:\temp.txt” in write-mode only?
outfile = open(“c:\temp.txt”, “w”)
outfile = open(“c:\\temp.txt”, “w”)
outfile = open(file = “c:\temp.txt”, “w+”)
outfile = open(file = “c:\\temp.txt”, “w+”)
Which of the following command is used to open a file “c:\temp.txt” in read-mode only?
infile = open(“c:\temp.txt”, “r”)
infile = open(“c:\\temp.txt”, “r”)
infile = open(file = “c:\temp.txt”, “r+”)
infile = open(file = “c:\\temp.txt”, “r+”)
Which logic gate is associated with the truth table?
NAND
OR
NOT
AND
