Search Header Logo

EndofT3ComSciY8Test

Authored by David Whitsed

Computers

8th Grade

Used 1+ times

EndofT3ComSciY8Test
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

22 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you introduce a pause in a micro:bit program using Javascript?

basic.pause ( milliseconds ) ;

basic.pause ( milliseconds )

basic.wait ( milliseconds ) ;

basic.wait ( milliseconds )

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the syntax error in this display LED code?

basic.showLeds(

. # # # .

# # # # #

# # # # #

. # # # .

. . # . .

)

It is missing enough hashtags ( # )

It is missing the quote marks ' '

The function should be Basic.ShowLEDs

It should use braces { }

3.

OPEN ENDED QUESTION

3 mins • 1 pt

How would you call (use) the basic.forever function in Javascript microbit to repeat the function 'catface'?

Evaluate responses using AI:

OFF

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Why is it important to organise code into functions when programming?

Functions are faster code

It saves code because functions can be reused

Coding cannot be done with functions

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Why is the forever function normally put at the end of the page of code for a microbit?

  1. Placing it at the end ensures that the microbit has time to warm up and properly initialize before entering into a continuous loop.

Because if you put it at the beginning, the microbit gets confused and thinks the code should only run once, defeating the purpose of a loop

The forever function will repeat forever, unless broken, so it is reasonable to do this last

It's a tradition started by early microbit developers to pay homage to the timeless nature of looping functions, much like the closing credits of a movie.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you create a variable called 'bigNumber' and store the number 5 in it using Javascript?

integer bigNumber = 5;

const bigNumber = 5;

let bigNumber = 5;

bigNumber = 5;

7.

OPEN ENDED QUESTION

3 mins • 1 pt

In coding, why is it beneficial to use variables?

Evaluate responses using AI:

OFF

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

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

Already have an account?

Discover more resources for Computers