wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Computer Pretest1(Python Grade7_t1)

Total questions: 30

Worksheet time: 15mins

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.

Python correct naming convention for variables is?

a)

new_user25

b)

NewUser25

c)

25_new_user

d)

25NewUser

e)

NEWUSER25

9.

What result will display in the shell if 15 and 20 is entered by the user?

a)

"num1 + num2"

b)

1520

c)

35

10.
The number or word we give to a variable
a)
Value
b)
Bug
c)
Information
d)
Text
11.
What symbol do you use to make a comment in Python?
a)
@
b)
¬
c)
;
d)
#
12.
What extension must you add to the end of a file when saving?
a)
.xlsx
b)
.pptx
c)
.docx
d)
.py
13.
In the following code, "city" is an example of a what?
a)
List
b)
Loop
c)
Variable
d)
Array
14.
print("12"*3)
What would this print?
a)
36
b)
121212
c)
24
d)
12*3
15.

What will the output be from the following Python code?

print(9/3)

a)

3

b)

3.0

c)

9/3

d)

SyntaxError

16.

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!)

17.

What is the Python built-in function to converts a number to a string?

a)

str()

b)

int()

c)

parseInt()

d)

convert

18.
The correct way to write a variable in Python?
a)
my_variable = 10
b)
my variable = 10
c)
my_variable is 10
d)
my_variable: 10
19.

What is the missing instruction?

a)

Print

b)

print

c)

(print)

d)

"Print"

20.
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
21.
What is Python?
a)
text based programming language
b)
word processor 
c)
spreadsheet
d)
block based programming language
22.
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
23.
In python the ' INTEGER data type' can be defined as...?
a)
holds alphanumeric data as text
b)
holds whole numbers
c)
holds numbers with a decimal point
d)
holds either ‘true’ or ‘false’
24.
In python the ' STRING data type' can be defined as...?
a)
holds alphanumeric text
b)
hold whole numbers
c)
holds numbers with a decimal point
d)
holds either a true or false value
25.
In python the ' FLOAT data type' can be defined as...?
a)
holds alphanumerical data
b)

holds whole numbers

c)

holds a decimal point in a number

d)
hold either true or false
26.
In python the ' BOOLEAN data type' can be defined as...?
a)
holds alphanumerical data
b)
holds whole numbers
c)
holds a number with a decimal point
d)
holds either true or false
27.
what is correct code for INTEGER in python?
a)
in
b)
ing
c)
int
28.
Which of the following is a float?
a)
new_var = 1234
b)
new_var = True
c)
new_var = 1.234
d)
new_var = "True"
29.

The requirements for printing a string in Python are:

a)

( ) , ! and " "

b)

( ) and !

c)

( ) and " "

d)

" " and !

30.

My_name = "Awesome"

My_name in this string is...

a)

a variable

b)

syntax

c)

my name

d)

prompt