wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Python Shapes and Colors

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

Which line contains color tuples? A: r = pygame.Rect(0, 0, 400, 400) B: pygame.draw.ellipse(window, (0, 255, 255), r)

a)

A

b)

B

2.

What color is represented by the tuple (0, 0, 0)?

a)

black

b)

white

c)

green

d)

blue

3.

What color is represented by the tuple (255, 255, 255)?

a)

black

b)

white

c)

green

d)

blue

4.

Which of the following shapes must be defined on a separate line before you can draw it?

a)

circle

b)

line

c)

rectangle

d)

polygon

5.

The three values in a color tuple stand for what three colors?

a)

black white grey

b)

red green blue

c)

yellow magenta cyan

d)

red blue yellow

6.

A gradient is a

a)

line applied to the shape of the object

b)

gradual transition from one color to another

c)

coding function that calls the library

d)

shadowing of the variable

7.

In Python, to draw a shape with a border, you draw the same shape _______.

a)

once

b)

twice

c)

3 times

d)

not at all

8.

What is the line of code used to draw a polygon?

a)

draw = polygon

b)

polygon initiated

c)

pygame.draw.polygon()

d)

draw.line

9.

What shapes can you draw in Python? (choose all that apply)

a)

circle, triangle, ellipse, square

b)

square, circle, polygon, octagon

c)

ellipse, polygon, circle, triangle

d)

circle, ellipse, rectangle, polygon

10.

Colors are represented by the color tuple _________

a)

(g,b,m)

b)

(r, g, b)

c)

(e,t,g)

d)

(r,g,x)