Worksheets8.4 Essential Knowledge Assessment
Total questions: 18
Worksheet time: 9mins
Which of the following correctly stores user input in a variable?
input("Name") = name
name = input("Name")
name == input("Name")
input = name("Name")
What is output in a program?
Data displayed to the user
Data stored in a file
Data entered by the user
A type of operator
Sequence refers to:
Instructions executed in order
Instructions executed randomly
Making decisions
Repeating instructions
What is the result of: print("Hello" + "World")
Hello World
HelloWorld
Hello+World
Error
Which of these lines takes user input?
x = input("Enter a number")
print(x)
x = 5
int(x)
What is a variable?
A memory location storing data
A loop
A comparison operator
An output device
What happens if the program executes instructions in the wrong order?
Nothing
Program may behave incorrectly
Program always crashes
Python automatically fixes it
Which line correctly stores a user’s favourite colour?
colour = input("Enter colour")
input("Enter colour") = colour
colour == input("Enter colour")
colour.input("Enter colour")
Which of the following is not a data type in Python?
int
float
number
str
Which operator checks equality?
=
==
!=
>
Which of the following is an arithmetic operator?
==
>=
+
!=
Which of the following is a comparison operator?
*
!=
+
/
What does % do in Python?
Adds numbers
Finds remainder
Divides numbers
Multiplies numbers
What does the assignment operator do?
Compares values
Stores a value in a variable
Prints output
Changes data type
Which of these is a string?
42
"Python"
3.14
True
What is casting?
Printing output
Converting one data type to another
Storing variables
Comparing numbers
What is the output?
5
23
Error
6
Which library is used for drawing graphics in Python?
pygame
turtle
math
random
