Font size
WorksheetsCoding SGO
Total questions: 9
Worksheet time: 9mins
What would this code print?:
print('Hello,world!')
'Hello,World!'
Hello,World.
Hello!, World!;
Hello, world!
What could this code print out?
print (random.randint(0,9))
a random integer between 0 and 9
a random letter between a and j
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.");
}
The number is even.
The number is odd.
Which one of these is NOT part of the comments?
<!-- -->
sticky note in scratch
~
//Comment
Select all that are correct:
What is a reason you would leave a comment in your code?
To give it orders
To leave notes so that you can edit later / pick up where you left off
To Print a number
To tell others how your code works
Select All that are Correct:
When working on someone else's code, what should you do before coding?
Read the comments
Try to talk to the person if you can.
Turn off your computer
Delete all their copies of their previous code versions
What is the name of the file(s) full of instructions, tutorials, and important information, as well as any FAQs?
Documentation
Youtube
Google Documents
Github
Select all that apply:
What are the reasons that documentation can assist you?
It will write your code for you.
It can assist you in things you have not memorized.
It may have comments or instructions.
It may have examples of code for you to look at and use.
If you wrote the documentation, it can help show you what you did on that day.
Select all that apply:
What are some things you can do after you find an error in your code?
Ask the teacher
Ask your classmates
Check documentation
Ask your pets
