IST CodeHS Unit 8 JavaScript Review

IST CodeHS Unit 8 JavaScript Review

9th - 12th Grade

22 Qs

quiz-placeholder

Similar activities

Lecture Exercise Topic 1.3

Lecture Exercise Topic 1.3

12th Grade

21 Qs

Types of Computers

Types of Computers

10th Grade

20 Qs

Unit Test 1 Class 8 Computer

Unit Test 1 Class 8 Computer

8th - 9th Grade

20 Qs

Software

Software

10th Grade

20 Qs

Data Structures: 1D,2D & List

Data Structures: 1D,2D & List

11th Grade

17 Qs

แบบทดสอบบทที่ 1 เรื่อง ข้อมูลมีคุณค่า ม.5

แบบทดสอบบทที่ 1 เรื่อง ข้อมูลมีคุณค่า ม.5

10th Grade

20 Qs

Quiz ASJ

Quiz ASJ

12th Grade

20 Qs

Google

Google

7th - 12th Grade

20 Qs

IST CodeHS Unit 8 JavaScript Review

IST CodeHS Unit 8 JavaScript Review

Assessment

Quiz

Computers

9th - 12th Grade

Practice Problem

Medium

Created by

Jason Bentley

Used 14+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

22 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

If the user enters a diameter value in the variable called 'diameter', how can we use this value to draw a circle with the correct diameter?

var c1 = new Circle(diameter/2)

var c2 = new Circle(diameter)

new Circle(diameter*2)

var c3 = new Circle()

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

When prompted for two inputs, the user enters 'Kyle' and then 'Davis'. What is printed by this JS code?

var first = readLine("What is your first name? ");

var last = readLine("What is your last name? ");

var whole = first + last;

println(whole);

whole

KyleDavis

Kyle Davis

Davis Kyle

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What are the x,y coordinates of the center of the canvas?

0, 0

getWidth(), getHeight()

getWidth()/2, getHeight()/2

0, getHeight()*2

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What are the x,y coordinates of the bottom right of the canvas?

0, 0

getWidth(), getHeight()

getWidth()/2, getHeight()/2

0, getHeight()*2

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

If the user enters a radius value in the variable called 'radius', how can we use this value to draw a circle with the correct radius?

var c1 = new Circle(radius/2)

var c2 = new Circle(radius)

new Circle(radius*2)

var c3 = new Circle()

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What does this code do?

var rad = readInt("Enter the radius: ");

var c = new Circle(rad);

c.setPosition(getWidth()/2, rad);

add(c);

Draws a circle at the center of the canvas with a user inputted radius

Draws a circle with center at (0, 0)

Draws a circle with custom size that is centered and tangent to the top of the canvas

Draws a circle with a random radius at the top of the canvas

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

var circle = new Circle(16);

What is the meaning of the above code?

Creates a circle object with radius 16 pixels

Draws a circle with center at (0, 0)

Creates a circle object with center at (0, 16)

Creates a circle object with circumference of 16 pixels

Create a free account and access millions of resources

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?