wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Chirag: Fundamentals of Computing S2 Exam Part 2 2021-22

Total questions: 25

Worksheet time: 2hrs 5mins

Name
Class
Date
1.

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?

a)

If Statement

b)

If / Else Statement

c)

While Loop

2.

Why should a programmer indent their code?

a)

Helps show the structure of the code.

b)

Easier for other people to understand by matching our code to each command.

c)

All code inside a function should be indented.

d)

All of the Above

3.

Debugging Basics has two main strategies. They are ?

a)

Attention to Detail and Questioning Assumptions

b)

Questioning Assumptions and Tricky Bugs

4.

What type of error do we have if the program doesn't start running?

a)

Syntax Error

b)

Runtime Error

c)

Logic Error

5.

What type of error do we have when the program starts running, but doesn't do what it is suppose to do?

a)

Syntax Error

b)

Runtime Error

c)

Logic Error

6.

What type of error is when the program starts running, but crashes when running?

a)

Syntax Error

b)

Runtime Error

c)

Logic Error

7.

What is the proper function to call to print to the screen?

a)

write

b)

println

c)

PRINT

8.

What keyword do you need to use to define a variable in JavaScript?

a)

var

b)

int

c)

x

9.

What function do you need to call to ask the user of the program to enter text?

a)

readLine

b)

text

c)

println

10.

To ask the user of the program for a number, which function should you use?

a)

readInt

b)

readFloat

c)

Both readInt and readFloat are used for numbers

11.

What symbol do you use to do division in JavaScript?

a)

%

b)

/

c)

*

12.

What symbol do you use to do multiplication in JavaScript?

a)

X

b)

*

c)

#

13.

What are the coordinates of the top right corner of the screen?

a)

0,0

b)

getWidth(), 0

c)

getWidth(); getHeight()

14.

What color would be created by the following lines of code?

a)

Yellow

b)

Green

c)

Red

15.

A store has 20 apples in its inventory. How can you store this information in a JavaScript variable?

a)

var numApples == 20;

b)

20 = numApples;

c)

var numApples = 20;

16.

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?

a)

var applesToBuy = readLine("How many apples would you like? ");

b)

var applesToBuy = println("How many apples would you like? ");

c)

var applesToBuy = readInt("How many apples would you like? ");

17.

In a graphics canvas, what are the coordinates of the bottom right corner of the window?

a)

0, 0

b)

0, getWidth()

c)

getWidth(), getHeight()

18.

What are the coordinates of the center of the window?

a)

getWidth(), getHeight()

b)

getWidth() / 2, getHeight() / 2

c)

getHeight() - getWidth(), getWidth() - getHeight()

19.

What is the meaning of the x variable in the following code:

a)

The x coordinate of the center of the circle

b)

The radius of the circle

c)

The position of the circle

20.

This term is know for getting the ideas out of your head and into the physical world.

a)

Empathy

b)

Sympathy

c)

Prototyping

21.

Which term is defined as the forming of an idea, to imagine or to conceive, to think?

a)

Ideate

b)

Iterate

c)

Prototype

22.

Which term is defined as the ability to understand and share the feelings of another?

a)

Empathy

b)

Sympathy

c)

Iterate

23.

During this stage you have the chance to try out your solutions and get feedback.

a)

Feedback

b)

Test

c)

Empathize

24.

These skills are learned abilities, teachable abilities.

a)

Hard Skills

b)

Soft Skills

25.

These skills relate to how you work, interpersonal skills, and communication skills.

a)

Hard Skills

b)

Soft Skills