wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

FGCT4023 Topic 5 - Colour & Text

Total questions: 10

Worksheet time: 8mins

Name
Class
Date
1.

What is the output of this code?

String one = "Hello";

String two = "Hello";

println(one.equals(two));

a)

one.equals(two)

b)

Hello

c)

Hello
Hello

d)

true

2.

What is the output of this code?

String one = "Hello";
println(one.toUpperCase());

a)

HELLO

b)

Hello

c)

one.toUpperCase()

d)

hello

3.

What does this code do?

textSize(random(12, 36));

a)

Generate a random text size of 12 to 35

b)

Generate a random location of where the text is placed on the canvas

c)

Generate a random font for the text

d)

Generate a random text

4.

Which of these functions should be used to display a text on the windows?

a)

println()

b)

print()

c)

text()

d)

display()

5.

What is the output of this code?

text("Hello\nWorld", 20, 100);

a)

Hello\nWorld

b)

Hello\nWorld 20 100

c)

Hello World

d)

Hello
World

6.

What is the output of this code?

text("Value is " + 20 + 24, 0, 20);

a)

Value is 2024

b)

Value is 44

c)

Value is 20 24 0 20

d)

Value is 20 + 24 0 20

7.

What is the colour produced from this code?

fill(0, 100);

square(0, 0, 40);

a)

Black

b)

White

c)

Gray

d)

No colour

8.

What is the colour of the square from this code?

background(255);

fill(0, 0);

square(0, 0, 40);

a)

Black

b)

White

c)

Gray

d)

No colour

9.

True or false: Processing uses HSB as its default colour mode.

a)

True

b)

False

10.

True or false: Colours in Processing can be defined by the RGB, HSB and hexadecimal notation values.

a)

True

b)

False