WorksheetsG8_Quiz1_2024_Python
Total questions: 21
Worksheet time: 11mins
Name
Class
Date
1.
What is the word (command) used to display numbers and text on the screen?
a)
print
b)
input
c)
output
d)
command
2.
What is a variable?
a)
A box(memory location) where you store values
b)
a type of graphics
c)
Data type
d)
a type of memory
3.
What symbol is used in python to assign values to a variable?
a)
equals =
b)
plus +
c)
forward slash /
d)
asterisk *
4.
What will be the output?
name = "Dave"
print (name)
a)
Dave
b)
'Dave'
c)
name
d)
(name)
5.
A syntax error means your code has a 'grammar' mistake or you used symbols/operations incorrectly
a)
True
b)
False
6.
What Python command lets the user enter an answer to a question?
a)
answer()
b)
open()
c)
print()
d)
input()
7.
Which statement correctly assigns the string "Tanner" to the variable name?
a)
name = print( "Tanner")
b)
input("Tanner")
c)
name = "Tanner"
d)
name = input("Tanner")
8.
What result will display in the shell if 15 and 20 is entered by the user?
a)
"num1 + num2"
b)
1520
c)
35
9.
What symbol do you use to make a comment in Python?
a)
@
b)
¬
c)
;
d)
#
10.
What extension must you add to the end of a file when saving?
a)
.xlsx
b)
.pptx
c)
.docx
d)
.py
11.
In the following code, "city" is an example of a what?
a)
List
b)
Loop
c)
Variable
d)
Array
12.
What will the output be from the following Python code?
print(Hello world!)
a)
Hello world!
b)
SyntaxError
c)
Hello world
d)
print(Hello world!)
13.
When you have an error in your code what is the term to summarise finding and fixing that error?
a)
Error checking
b)
Debugging
c)
Syntax finder
d)
Error finder
14.
A program runs and, during running, is asked to divide by zero. The program crashes. This is an example of:
a)
a logic error
b)
a run-time error
c)
a logic error
d)
a user error
15.
What is Python?
a)
text based programming language
b)
word processor
c)
spreadsheet
d)
block based programming language
16.
What does the term 'debug' mean?
a)
Identify errors and fix them.
b)
Making a calculation
c)
A set of instructions
d)
Looking at code
17.
What is the output
print("HI")
a)
HI
b)
Hi
c)
hi
d)
hI
18.
What is the output
print("Hi")
a)
HI
b)
Hi
c)
hi
d)
hI
19.
What is the output
print("hi")
a)
HI
b)
Hi
c)
hi
d)
hI
20.
What is the output
print("hi Ali")
a)
HI Ali
b)
Hi ali
c)
hi Ali
d)
hI Ali
21.
What will the output be from the following code?
Print("Hello world!")
Print("Hello world!")
a)
NameError
b)
Hello world!
c)
"Hello world"
d)
Print(Hello world!)
100 %
