WorksheetsEnd of term quiz
Total questions: 71
Worksheet time: 35mins
What does the following code do? myAge = int (myAge)
Converts the var (variable) myAge to a string
Converts the var (variable) myAge to a integer
Converts the var (variable) myAge from a integer to a string
Converts the var (variable) myAge to if statement
print("Hello world!" * 2)
What is the Python built-in function to converts a number to a string?
str()
int()
parseInt()
convert
Which of these is correct Python conditional statement?
IF answer == "Yes":
if answer == "Yes"
if answer == "Yes":
if answer = "yes":
Choose the disadvantage
What is Encryption software used to do?
Permanently change data
Revert data to something it wasn't before
Change data so it is unreadable by an interceptor
Change data so it is readable by an interceptor
What is the purpose of Anti-Virus software?
To keep the computer safe from malicious software
To keep people safe from other people
To keep the computer safe from defragmantation
To keep data safe
The term OS is short for?
Apple
Operating Software
Operating System
Overload System
The ability for different people to use the same computer is made possible through:
Open-source software
Desktop elements
User accounts
Settings app
Which of these tasks is a function of the operating system?
Scanning a photograph
Copying a file
Producing a database report
Adding data to a spreadsheet
Which of the followings is not GUI operating system?
DOS
Windows
iOS
Linux
How can the OS help manage security of the system?
The OS can hire backup
User accounts may be password protected
Files can self destruct after a set time
If I want to add to the end of a text file, I should:
MyCipher = open("MyCipher.txt", "w")
MyCipher = open("MyCipher.txt", "a")
MyCipher = open("MyCipher.txt", "w+")
MyCipher = open("MyCipher.txt", "s")
Which of these will generate an error?
MyCipher.write("writing")
MyCipher..write(writing)
MyCipher.write("writing",writing)
MyCipher.readline()
Why is it best to open a file with with in Python?
It automatically closes the file
Easier to read the code
Better for binary files
Closers to the pseudocode
What command can you use to separate parts of a line?
separate()
split()
divide()
cut()
What command can you use to send back data from a function?
return
sendback
back
print()
How do you CALL the function name in Python?
name()
def name()
call name()
GOTO name()
Comments are
statements only the computer can understand.
programming notes or reminders that the computer ignores.
not appreciated.
statements that allow the computer to test a value and perform different actions depending on the outcome of that test.
A programming statement that allows a block of code to be repeated for a given range of values defines
function
while loop
for loops
applications
Import means
A named, reusable set of programming statements to perform a specific task.
A programming statement that allows a block of code to be repeated for a given range of values.
To bring reusable code or data into a program from another program or module.
Any data or information entered into a computer.
The spelling and grammar rules of a programming language is called
GSP
syntax
code
comments
Which of these is the correct code for creating a list of names?
nameList = John, Harry, Jesse, John, Harry, Harry
nameList = ("John", "Harry", "Jesse", "John", "Harry", "Harry")
nameList = ["John", "Harry", "Jesse", "John", "Harry", "Harry"]
nameList = [John, Harry, Jesse, John, Harry, Harry]
List items have an index number. In the following list, which item has the index number of 3?
["John", "Harry", "Jesse", "John", "Harry", "Harry"]
"John"
"Harry"
"Jesse"
"John"
Which of these pieces of code would return the name "Harry" from the following list?
nameList = ["John", "Harry", "Jesse", "John", "Harry", "Harry"]
nameList()
nameList[1]
NameList(4)
nameList["4"]
The list needs one more name added to the end - "Felipe". Which piece of code below would do this?
nameList = ["John", "Harry", "Jesse", "John", "Harry", "Harry"]
nameList.append(Felipe)
append(nameList,"Felipe")
nameList.append["Felipe",7]
nameList.append("Felipe")
Is this the correct code for a list?
register = {"Sam", "Pheobe", Georgia", Richard"}
Yes
No
This list contains items of what data type?
String
Boolean
Float
Integer
Which symbols are used to open and close a list?
( ) round brackets
( ) curly brackets
[ ] square brackets
" " speech marks
How do i remove something from a list?
variable.append()
variable.delete()
variable.remove()
variable=(new variable)
What is used to separate elements in a list?
Bracket
Comma
Full Stop
Space
variable.sort() will do what?
Sort the list into alphabetical order
Sort the list into reverse order
Create a new list
Error
What does the '#' allow you to do?
Repeat code
Comment on code
Print code
End code
Which of these operators means EQUAL TO?
'='
'=>'
'<='
'=='
What will this code do?
Print Numbers 1-11
Print Numbers 1-10
Print Numbers 2-10
Print Error
Which container type will you use to store the personal best times achieved by club swimmers in the 100m freestyle such as: Mark: 65.34s, Freya: 68.04s, etc.
tuple
list
dictionary
What is the output of the following code :
print(9//2)
4.5
4.0
error
4
In order to store values in terms of key and value we use what core data type.
Dictionary
Tuple
List
None of the above
Which is the correct operator for power?
//
^
**
None of the above
What is the answer to this expression 22 % 3 is?
0
1
5
7
Which of the following is not a keyword?
if
not
global
swap
holds whole numbers
holds a decimal point in a number
What would this print?
print("3+4")
