Graphic Programming Basics Flashcard

Graphic Programming Basics Flashcard

Assessment

Flashcard

Computers

9th Grade

Hard

Created by

Quizizz Content

FREE Resource

Student preview

quiz-placeholder

9 questions

Show all answers

1.

FLASHCARD QUESTION

Front

What does the getWidth() function return?

Back

The width of the canvas

2.

FLASHCARD QUESTION

Front

In the coordinate system, what are the coordinates of the top-left corner? Options: (100, 100), (0, 0), (200, 0), (0, 100)

Back

(0, 0)

3.

FLASHCARD QUESTION

Front

What is the correct way to create a circle with a radius of 30? Options: `var circle = new Rectangle(30);`, `var circle = new Circle(30);`, `var circle = Circle(30);`, `var circle = new Shape(30);`

Back

`var circle = new Circle(30);`

4.

FLASHCARD QUESTION

Front

What function is used to position a circle on the canvas?

Back

`circle.setPosition(x, y);`

5.

FLASHCARD QUESTION

Front

How do you add a rectangle to the canvas? Options: `add(rect);`, `draw(rect);`, `append(rect);`, `addRectangle(rect);`

Back

`add(rect);`

6.

FLASHCARD QUESTION

Front

What are the dimensions of the rectangle created with `new Rectangle(100, 50);`?

Back

100 pixels wide and 50 pixels tall

7.

FLASHCARD QUESTION

Front

What does the function `add(text)` do?

Back

Adds the text to the canvas

8.

FLASHCARD QUESTION

Front

What color will the circle be in the code: `circle.setColor(Color.blue);`?

Back

Blue

9.

FLASHCARD QUESTION

Front

How do you define the text "Hello World" in the program?

Back

`var text = new Text("Hello World");`