Java Basics
Loops & Logic
Functions
Events & Animation
AI & Computing
100

Solve the expression:

6*4 + 18/3

What is 30?

100

A loop that repeats until a condition becomes false is called this.

What is a while loop?

100

What is the minimum number of parameters needed to call this function?

function drawBox(width, height, color)

What is 3?

100

Something triggered by a user action like clicking or typing is called this.

What is an event?

100

The Jacquard Loom used this technology to control patterns.

What are punched cards?

200

What allows a variable to be used from anywhere in the program?

What is global?

200

How many times will “Hello” print?

repeat 3 times {

    repeat 5 times {

        console.log("Hello");

    }

}

What is 15 times?





200

Which variable is a parameter?

function total(price, tax){

    let finalCost = price + tax;

    return finalCost;

}

What is price or tax?

200

Which function runs code repeatedly every few milliseconds?

What is setTimer?

200

This computer scientist helped crack the German Enigma code during WWII.

Who is Alan Turing?

300

A variable declared inside a function is called this type of variable.

What is a local variable?

300

Choose the logical operator:

if(score > 70 _____ score < 100)

What is &&?

300

What is returned?

function multiply(a, b){

    return a * b;

}

What is the product of a and b?

300

Which method runs a callback function when the mouse is clicked?

What is mouseClickMethod?

300

What type of AI creates new text, images, or music?

What is Generative AI?

400

This keyword sends a value back to where a function was called.

What is return?

400

What is the final value?

let num = 12;

let result = (num > 5) || (num < 2);


What is true?

400

What will print?

function main(){

    let x = 4;

    show(x);

    console.log(x);

}

function show(num){

    console.log(num + 6);

}

What is:

10

4

400

Which variable changes horizontal movement in animation?

What is dx?

400

This type of AI uses previous information to make predictions.

What is Predictive AI?

500

A block of reusable code that performs one specific task is called this.

What is a function?

500

What prints?

for(let i = 2; i < 12; i += 3){

    console.log(i);

}

What is:

2

5

8

11

500

Functions that use parameters instead of hard-coded values are more __________.

What is reusable?

500

What code makes a bouncing ball reverse vertical direction?

dy = _____;

What is -dy?

500

Which development helped make computers easier for average people to use?

What is Graphical User Interface (GUI)?

M
e
n
u