NEW
Font size
S
M
L
XL
WorksheetsPython Lessons 1 & 2 Review
Total questions: 26
Worksheet time: 13mins
Name
Class
Date
1.
What is the correct format of the print statement?
a)
print("Python is cool")
b)
print("Python is cool)
c)
print "Python is cool"
d)
print(Python is cool")
2.
Who is Guido van Rossum?
a)
He created Python
b)
He invented computers
c)
He helped build Apple
d)
He is the highest-paid professional video gamer in the world
3.
What is the line continuation symbol?
a)
\
b)
#
c)
/
d)
"""
e)
|
4.
Which is greater, 37/2 or 37//2?
a)
37/2
b)
37//2
c)
Neither, they are equal
5.
What is 17 % 3?
a)
2
b)
5
c)
5.666666
d)
14
6.
What is 10 % 1?
a)
0
b)
1
c)
10
d)
9
7.
What is 1000000 % 1?
a)
0
b)
1000000
c)
10
d)
1000
8.
What is 3 + 3 * 8 / 2?
a)
15
b)
24
c)
7
d)
10
9.
What does print("\a") do?
a)
Makes sound
b)
Prints on a new line
c)
Prints a space
d)
Prints at the next tab
10.
What does print("\t") do?
a)
Makes sound
b)
Prints on a new line
c)
Prints a space
d)
Prints at the next tab
11.
What does print("\n") do?
a)
Makes sound
b)
Prints on a new line
c)
Prints a space
d)
Prints at the next tab
12.
Convert 111 to decimal
a)
7
b)
3
c)
8
d)
4
13.
Convert 9 to binary
a)
1001
b)
1000
c)
111
d)
1010
14.
Will this code work?
a)
Yes
b)
No
15.
Will this code work?
a)
Yes
b)
No
16.
Will this code work?
a)
Yes
b)
No
17.
Which mode in Idle can you test commands and get immediate response?
a)
Interactive
b)
Script
c)
Console
d)
Active
18.
Which mode in Idle can you type multiple commands and save a program?
a)
Interactive
b)
Script
c)
Console
d)
Active
19.
What does this output?
print("T" + "G" + "I" + "F")
a)
TGIF
b)
T G I F
c)
TypeError
d)
NameError
20.
What does this output?
print("T" , "G" , "I" , "F")
a)
TGIF
b)
T G I F
c)
TypeError
d)
NameError
21.
What does this output?
print("TGIF"*3)
a)
TGIFTGIFTGIF
b)
TGIF TGIF TGIF
c)
TGIF * 3
d)
TGIF3
e)
TypeError
22.
What is the CPU?
a)
The brains of the computer
b)
Takes and algorithm and encodes it into a program
c)
An electronic machine that processes data quickly
d)
A sequence of instructions that work to solve a specific problem
e)
The language used to execute instructions to the computer
23.
What is Coding?
a)
Another name for programming
b)
An electronic machine that processes data quickly
c)
A sequence of instructions that work to solve a specific problem
d)
The language used to execute instructions to the computer
e)
The brains of the computer
24.
What is a Programming Language?
a)
The language used to execute instructions to the computer
b)
Another name for programming
c)
An electronic machine that processes data quickly
d)
A sequence of instructions that work to solve a specific problem
e)
The brains of the computer
25.
What is a Program?
a)
A sequence of instructions that work to solve a specific problem
b)
An electronic machine that processes data quickly
c)
The brains of the computer
d)
The language used to execute instructions to the computer
26.
What is a Computing Artifact?
a)
Anything created by a human using a computer
b)
The language used to execute instructions to the computer
c)
Another name for programming
d)
An electronic machine that processes data quickly
e)
A sequence of instructions that work to solve a specific problem
Reset
