Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

CP M.6 Assessment Review

Total questions: 17

Worksheet time: 11mins

Name
Class
Date
1.

Color codes are stored as:

a)

int

b)

dec

c)

Strings

d)

float

2.

Which of the following is NOT an acceptable way to create a color?

a)

blue

b)

"#ff2341"

c)

"RGB (0, 15, 234)"

d)

"cyan"

3.

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()

a)

1

b)

5

c)

10

d)

20

4.

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)

a)

3

b)

6

c)

12

d)

24

5.

The coordinate (6, 4) on this coordinate plane is located at point:

a)

a

b)

b

c)

c

d)

d

6.

The coordinate (2, 8) on this coordinate plane is located at point:

a)

a

b)

b

c)

c

d)

d

7.

What does RGB stand for? _________, ________, __________

(a)  

8.

You want to draw a horizontal line across the middle of the entire frame.

To code this, the ____ values will remain the same.

a)

Both x and y values

b)

Neither x or y values

c)

  x

d)

y

9.

The color in a circle is a _____________ data type.

a)

integer

b)

random

c)

decimal

d)

String

10.

A (a)   variable is available throughout a program.

11.

A function that draws a circle on the canvas.

a)

draw_polygon

b)

draw_line

c)

draw_circle

d)

create_frame

12.

A command used to mix and create colors in Python using red, green and blue.

a)

RGB

b)

Global variable

c)

draw_text

d)

create_frame

13.

A variable declared outside of a function, that can be used anywhere in a program.

a)

Global variable

b)

Frame

c)

RGB

14.

What is letter A actually responsible for?

canvas.draw_circle ((500, 300), A, B, C, D)

a)

fill color

b)

line color

c)

radius

d)

line weight

15.

What is letter B actually responsible for?

canvas.draw_circle ((500, 300), A, B, C, D)

a)

fill color

b)

line color

c)

radius

d)

line weight

16.

What color does the following command make?

RGB ( 250, 0, 0)

a)

red

b)

green

c)

yellow

d)

blue

17.

What color does the following command make?

RGB ( 100, 100, 100)

a)

red

b)

green

c)

gray

d)

blue