wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Diagnostic Assessment Python

Total questions: 20

Worksheet time: 10mins

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 is the name of the programming language we are learning?
a)
Scratch
b)
Python
c)
Pie thin
d)
Scribble
5.

What will be the output?

name = "Dave"

print (name)

a)

Dave

b)

'Dave'

c)

name

d)

(name)

6.
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
7.
A syntax error means your code has a 'grammar' mistake or you used symbols/operations incorrectly
a)
True
b)
False
8.
What is Python?
a)
text based programming language
b)
word processor 
c)
spreadsheet
d)
block based programming language
9.
What Python command lets the user enter an answer to a question?
a)
answer()
b)
open()
c)
print()
d)
input()
10.
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")
11.

Python language was developed in what year?

a)

1985

b)

2001

c)

1991

d)

1820

12.

Is python an interpreter or compiler programming language?

a)

Compiler

b)

Interpreter

13.

Python is uses braces to block off code

a)

True

b)

False

14.

Python uses indentation to block code into chunks

a)

True

b)

False

15.

Python correct naming convention for constants is?

a)

firstName

b)

First_Name

c)

FIRST_NAME

d)

firstname

16.

Python correct naming convention for variables is?

a)

new_user25

b)

NewUser25

c)

25_new_user

d)

25NewUser

e)

NEWUSER25

17.

What output will the console show, if 15 and 30 are entered by the user?

a)

Syntax error

b)

The sum of the two numbers - 45

c)

The concatenation of the two numbers - 1530

d)

Complier error

18.

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

a)

"num1 + num2"

b)

1520

c)

35

19.

What datatype will the answer be if the user enters 15 and 30?

a)

Integer

b)

String

c)

Boolean

d)

Float

20.

Which one will display when this code is run?

a)
b)
c)
d)