wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Coding SGO

Total questions: 9

Worksheet time: 9mins

Name
Class
Date
1.

What would this code print?:


print('Hello,world!')

a)

'Hello,World!'

b)

Hello,World.

c)

Hello!, World!;

d)

Hello, world!

2.

What could this code print out?


print (random.randint(0,9))

a)

a random integer between 0 and 9

b)

a random letter between a and j

3.

Read the below code, after reading it, what do you think would be printed out after you submit 2 into the console?


let number = prompt("Enter a number:");


if(number %2==0) {

console.log("The number is even.");

}


else {

console.log("The number is odd.");

}

a)

The number is even.

b)

The number is odd.

4.

Which one of these is NOT part of the comments?

a)

<!-- -->

b)

sticky note in scratch

c)

~

d)

//Comment

5.

Select all that are correct:


What is a reason you would leave a comment in your code?

a)

To give it orders

b)

To leave notes so that you can edit later / pick up where you left off

c)

To Print a number

d)

To tell others how your code works

6.

Select All that are Correct:

When working on someone else's code, what should you do before coding?

a)

Read the comments

b)

Try to talk to the person if you can.

c)

Turn off your computer

d)

Delete all their copies of their previous code versions

7.

What is the name of the file(s) full of instructions, tutorials, and important information, as well as any FAQs?

a)

Documentation

b)

Youtube

c)

Google Documents

d)

Github

8.

Select all that apply:


What are the reasons that documentation can assist you?

a)

It will write your code for you.

b)

It can assist you in things you have not memorized.

c)

It may have comments or instructions.

d)

It may have examples of code for you to look at and use.

e)

If you wrote the documentation, it can help show you what you did on that day.

9.

Select all that apply:


What are some things you can do after you find an error in your code?

a)

Ask the teacher

b)

Ask your classmates

c)

Check documentation

d)

Ask your pets