wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Chapter 1 Python

Total questions: 12

Worksheet time: 19mins

Name
Class
Date
1.
Which of the following words describes this process:
To translate a program written in a high-level language into a low-level language all at once, in preparation for later execution.
a)
Transfer
b)
Compile
c)
Interpret
d)
Configure
2.
What does "parse" mean in the context of computer programming?
a)
To count up all the characters in a program.
b)
To determine the programming language that is being used. 
c)
To cringe because someone's program was awful. 
d)
To examine a program and analyze the syntactic structure.
3.
Which of the following is NOT one of the 3 general coding errors introduced in Chapter 1?
a)
Logic
b)
Semantic
c)
Complex
d)
Syntax
4.
A syntax errors means you have an error with your Python grammar or a symbol/operator is incorrectly used.  
a)
TRUE
b)
FALSE
5.
Which type of error can occur in your program, but the compiler will not be able to detect it?
a)
Big Error
b)
Syntax Error
c)
Logic Error
d)
Semantic Error
6.
Python code may be sequential, conditional, or repeated. Using a block of code with an "if" statement would fall into which category?
a)
Sequential
b)
Conditional
c)
Repeated
7.
Python accepts single ('), double (") and triple (''' or """) quotes to denote strings. Which of the following is NOT acceptable Python syntax?
a)
print 'Hello World'
b)
print "Hello World"
c)
print 'Hello World"
d)
day = "Thursday"
8.
What is the output from this program?
a)
$3.40
b)
I owe the grocer $3.40
c)
I owe $3.40 grocery bill
d)
Nothing will print. 
9.
When creating a python file, you should save the file with the suffix....
a)
.py
b)
.python
c)
.pyt
d)
.p
10.
What is the output from this program?
a)
5
7
9
A python is a non-venomous snake
done
b)
A python is a non-venomous snake
A python is a non-venomous snake
A python is a non-venomous snake
done
c)
A python is a non-venomous snake
A python is a non-venomous snake
A python is a non-venomous snake 
A python is a non-venomous snake
done
d)
done
11.
People who speak Python are known as...
a)
Snake lovers
b)
Pythonistas
c)
Pythoners
d)
Monty Python fans
12.
What year did the implementation of Python take place?
a)
2008
b)
1996
c)
1974
d)
1989