Worksheetspython assessment
Total questions: 35
Worksheet time: 33mins
Name
Class
Date
1.
What is python named after
a)
The snake
b)
Television show called Monty Python
2.
What is the name of the environment in Python that write your programs and then test them out?
a)
Shell
b)
Window
c)
IDLE
d)
CLI
3.
What extension must you add to the end of a file when saving?
a)
.xlsx
b)
.pptx
c)
.docx
d)
.py
4.
What button do you press to compile (run) your program so that it runs in the shell?
a)
F3
b)
F5
c)
F7
d)
F9
5.
What symbol do you use to make a comment in Python?
a)
@
b)
¬
c)
;
d)
#
6.
What will the output be from the following code?
print(Hello world!)
a)
Hello world!
b)
SyntaxError
c)
Hello world
d)
print(Hello world!)
7.
What will the output be from the following code?
print("Hello world!" * 2)
print("Hello world!" * 2)
a)
TypeError
b)
Hello world world!
c)
Hello world!Hello world!
d)
Hello world! * 2
8.
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’
9.
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
10.
what is the code for a STRING in python?
a)
str
b)
stri
c)
stg
11.
what is correct code for INTEGER in python?
a)
in
b)
ing
c)
int
12.
What will the output be from the following code?
print(3+4)
print(3+4)
a)
3+4
b)
7
c)
SyntaxError
d)
print(3+4)
13.
What will the output be from the following code?
print(3*4)
print(3*4)
a)
34
b)
7
c)
12
d)
3*4
14.
>
a)
less than
b)
not equal to
c)
less than or equal to
d)
greater than
15.
<=
a)
less than
b)
less than or equal to
16.
==
a)
equal to
b)
assign a variable
c)
not equal to
d)
less than
17.
! =
a)
greater than variable
b)
less than variable
c)
equal to
d)
not equal to
18.
6 > 5
a)
TRUE
b)
FALSE
19.
3<=4
a)
TRUE
b)
FALSE
20.
2 = = 3
a)
TRUE
b)
FALSE
21.
45 ! = 2
a)
TRUE
b)
FALSE
22.
Which is an relational operator
a)
=
b)
==
c)
depends
d)
()
23.
Used to create exponents
a)
**
b)
"""
c)
%
d)
#
24.
stores a piece of data, and gives it a specific name
a)
variable
b)
whitespace
c)
interpreter
d)
modulo
25.
returns the remainder from division
a)
modulo
b)
exponments
c)
boolean
d)
variables
26.
a line of text that Python won't try to run as code
a)
comment
b)
modulo
c)
variable
d)
boolean
27.
symbol used for modulo
a)
%
b)
&
c)
#
d)
**
28.
a data type than can have one of two values: True or False
a)
boolean
b)
variable
c)
modulo
d)
interpreter
29.
102 = 100
Which of the following is used in Python to calculate ten squared?
Which of the following is used in Python to calculate ten squared?
a)
10 ** 2
b)
10 * 2
c)
10 % 2
d)
10 ** 10
30.
Which of the following statement is correct?
a)
Python is a high level programming language
b)
Python is an low level programming language
c)
Python is an machine code language
d)
All of the above
31.
Which data type represents a whole number?
a)
integer
b)
string
c)
float
d)
Boolean
32.
What data type is a in this code : a = "5"
a)
integer
b)
float
c)
boolean
d)
string
33.
What does the statement 'print' do?
a)
Output a hard copy of a program to a printer
b)
Output a message on the screen
c)
Print a hard copy of a flowchart to a computer
34.
What is a variable?
a)
A number
b)
A message input by the user
c)
A location in memory that we use to store data
35.
I write the python code in the python shell
a)
True
b)
False
100 %
