WorksheetsCP M.6 Assessment Review
Total questions: 17
Worksheet time: 11mins
Color codes are stored as:
int
dec
Strings
float
Which of the following is NOT an acceptable way to create a color?
blue
"#ff2341"
"RGB (0, 15, 234)"
"cyan"
Examine the code below. When this program runs, how many times will the word
"Goodbye" be printed?
import simplegui
def draw(canvas):
for i in range (5):
canvas.draw_text("Goodbye", (10, 25 + 20*i), 20, "red")
frame = simplegui.create_frame("Testing", 400, 400)
frame.set_draw_handler(draw)
frame.start()
1
5
10
20
Examine the code below. When this program runs, what value of x will be output?
x = 3
for i in range(3):
x = x * 2
print(x)
3
6
12
24
The coordinate (6, 4) on this coordinate plane is located at point:
a
b
c
d
The coordinate (2, 8) on this coordinate plane is located at point:
a
b
c
d
What does RGB stand for? _________, ________, __________
(a)
You want to draw a horizontal line across the middle of the entire frame.
To code this, the ____ values will remain the same.
Both x and y values
Neither x or y values
x
y
The color in a circle is a _____________ data type.
integer
random
decimal
String
A (a) variable is available throughout a program.
A function that draws a circle on the canvas.
draw_polygon
draw_line
draw_circle
create_frame
A command used to mix and create colors in Python using red, green and blue.
RGB
Global variable
draw_text
create_frame
A variable declared outside of a function, that can be used anywhere in a program.
Global variable
Frame
RGB
What is letter A actually responsible for?
canvas.draw_circle ((500, 300), A, B, C, D)
fill color
line color
radius
line weight
What is letter B actually responsible for?
canvas.draw_circle ((500, 300), A, B, C, D)
fill color
line color
radius
line weight
What color does the following command make?
RGB ( 250, 0, 0)
red
green
yellow
blue
What color does the following command make?
RGB ( 100, 100, 100)
red
green
gray
blue
