NEW
Font size
S
M
L
XL
WorksheetsPython programming
Total questions: 16
Worksheet time: 8mins
Name
Class
Date
1.
Which has integer data type?
a)
Phone number
b)
Zip code
c)
HN
d)
Number of students in the class
2.
What is Python really?
a)
Python is an interpreted language.
b)
visual basic
c)
a snake
d)
a form of font for writing
3.
what are the advantages of python?
a)
free and open source
b)
can do the work for you
c)
easy
4.
what is 8%2
a)
0
b)
16
c)
24
d)
86
5.
what is python?
a)
a programming language
b)
a code
c)
nothing
d)
a game
6.
Code executed based on a condition being true
a)
Sequence
b)
Selection
c)
Iteration
d)
Variable
7.
What does the following code do? myAge = int (myAge)
a)
Converts the var (variable) myAge to a string
b)
Converts the var (variable) myAge to a integer
c)
Converts the var (variable) myAge from a integer to a string
d)
Converts the var (variable) myAge to if statement
8.
What will the output be from the following code?
print(Hello world!)
print(Hello world!)
a)
Hello world!
b)
SyntaxError
c)
Hello world
d)
print(Hello world!)
9.
Tells the interpreter that the code which follows is a function
a)
const
b)
int
c)
def
d)
while
10.
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
11.
What syntax can you use to insert a line break between strings so that they appear over multiple lines?
a)
/
b)
\n
c)
\l
d)
n
12.
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
13.
If you want more than one option for your code, what do you use (after if)?
a)
elif
b)
else
c)
ifif
14.
Python is ___________ level programming language and is ___________.
a)
High, compiled
b)
High, interpreted
c)
Low, compiled
d)
Low, interpreted
15.
The syntax in Python (TM) is one of the main advantages over other high level programming languages.
a)
True
b)
False
16.
A string
a)
carries out an action
b)
the elements of a command
c)
a collection of characters
d)
how elements in a commad are arranged
Reset
