NEW
Font size
WorksheetsChirag: Fundamentals of Computing S2 Exam Part 2 2021-22
Total questions: 25
Worksheet time: 2hrs 5mins
You need to write a program where Karel will take a ball if there is a ball present, otherwise Karel should put down a ball. Which control structure do you need to use?
If Statement
If / Else Statement
While Loop
Why should a programmer indent their code?
Helps show the structure of the code.
Easier for other people to understand by matching our code to each command.
All code inside a function should be indented.
All of the Above
Debugging Basics has two main strategies. They are ?
Attention to Detail and Questioning Assumptions
Questioning Assumptions and Tricky Bugs
What type of error do we have if the program doesn't start running?
Syntax Error
Runtime Error
Logic Error
What type of error do we have when the program starts running, but doesn't do what it is suppose to do?
Syntax Error
Runtime Error
Logic Error
What type of error is when the program starts running, but crashes when running?
Syntax Error
Runtime Error
Logic Error
What is the proper function to call to print to the screen?
write
println
What keyword do you need to use to define a variable in JavaScript?
var
int
x
What function do you need to call to ask the user of the program to enter text?
readLine
text
println
To ask the user of the program for a number, which function should you use?
readInt
readFloat
Both readInt and readFloat are used for numbers
What symbol do you use to do division in JavaScript?
%
/
*
What symbol do you use to do multiplication in JavaScript?
X
*
#
What are the coordinates of the top right corner of the screen?
0,0
getWidth(), 0
getWidth(); getHeight()
What color would be created by the following lines of code?
Yellow
Green
Red
A store has 20 apples in its inventory. How can you store this information in a JavaScript variable?
var numApples == 20;
20 = numApples;
var numApples = 20;
You want to read input from the user to know how many apples they would like to buy. Which statement should you use to read in a number from the user?
var applesToBuy = readLine("How many apples would you like? ");
var applesToBuy = println("How many apples would you like? ");
var applesToBuy = readInt("How many apples would you like? ");
In a graphics canvas, what are the coordinates of the bottom right corner of the window?
0, 0
0, getWidth()
getWidth(), getHeight()
What are the coordinates of the center of the window?
getWidth(), getHeight()
getWidth() / 2, getHeight() / 2
getHeight() - getWidth(), getWidth() - getHeight()
What is the meaning of the x variable in the following code:
The x coordinate of the center of the circle
The radius of the circle
The position of the circle
This term is know for getting the ideas out of your head and into the physical world.
Empathy
Sympathy
Prototyping
Which term is defined as the forming of an idea, to imagine or to conceive, to think?
Ideate
Iterate
Prototype
Which term is defined as the ability to understand and share the feelings of another?
Empathy
Sympathy
Iterate
During this stage you have the chance to try out your solutions and get feedback.
Feedback
Test
Empathize
These skills are learned abilities, teachable abilities.
Hard Skills
Soft Skills
These skills relate to how you work, interpersonal skills, and communication skills.
Hard Skills
Soft Skills
