Search Header Logo

Debugging

Authored by Brenda McLachlin

Computers

3rd - 12th Grade

Used 7+ times

Debugging
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

18 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Why isn't my square showing up?


background(255);

fill(0, 0, 255);

quad(150, 150, 75, 75);

There aren't enough numbers in background

There aren't enough numbers in quad

Quad cannot draw squares

There's no draw function

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Why isn't my code running?


if (x > 12)

fill(0);

else

fill(255, 0, 0);

x can't be greater than 12

Missing braces after if and else

The first fill doesn't have enough numbers in it

Else is not a keyword in javascript

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Why isn't my code working?


var draw = fuction() {

fill(255, 0, 255);

ellipse(x, 200, 50, 50);

x++;

};

Unnecessary semicolon

A word is misspelled

Missing a comma

= should be ===

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Why isn't my code working?


for (var i = 0; 1 < 20; i++) {

ellipse(random(400), random(400), 50, 50);

}

Missing semicolon

Random doesn't have enough numbers in it

You wrote 1 instead of i

Improper definition of i

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Why isn't my code working?


var Thing = {

x : 12,

size : 20,

};

var thing1 = new Thing();

Thing is not an object prototype

Size is a reserved word

Commas should be semicolons

You can't use numbers in variable names

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

I'm trying to reset my ellipse to the left side of the screen. Why has it disappeared?


if (x < 400) {

x = -50;

}

Less than sign should be greater than sign

= should be ===

Missing semicolon

Missing else statement

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What should I add to make my circle move across the screen?


var x = 0;

ellipse(x, 200, 50, 50);

x++;

A draw function

A background

A fill function

All three

Access all questions and much more by creating a free account

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

Already have an account?