IST CodeHS Unit 8 JavaScript Review

Quiz
•
Computers
•
9th - 12th Grade
•
Medium

Jason Bentley
Used 13+ times
FREE Resource
22 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
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
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
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
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
Similar Resources on Wayground
25 questions
Feb 20, 2025 AP CompSci - 1st Period

Quiz
•
12th Grade - University
20 questions
Q3-1 Quiz Review

Quiz
•
11th Grade
20 questions
Functions Parameters Return

Quiz
•
9th - 12th Grade
20 questions
Functions Test

Quiz
•
9th - 12th Grade
26 questions
AP CSP Unit 7: Parameters, Returns, and Libraries

Quiz
•
9th - 12th Grade
22 questions
Java Code Snippets Quiz 1

Quiz
•
10th Grade
19 questions
JavaScript Data Structures

Quiz
•
9th - 12th Grade
20 questions
Java Summative Assessment 2

Quiz
•
12th Grade
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
Discover more resources for Computers
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
40 questions
LSHS Student Handbook Review: Pages 7-9

Quiz
•
11th Grade
24 questions
Scientific method and variables review

Quiz
•
9th Grade
10 questions
Characteristics of Life

Quiz
•
9th - 10th Grade
19 questions
Mental Health Vocabulary Pre-test

Quiz
•
9th Grade