NEW
Font size
WorksheetsFinal Exam FCS Westbury 2025
Total questions: 50
Worksheet time: 25mins
What is the main purpose of a computer program?
To execute random commands
To tell the computer what to do
To store pictures
To translate languages
In Karel, which command makes Karel move forward one space?
step()
move()
forward()
walk()
What happens if Karel tries to move forward but hits a wall?
Karel gets stuck with an error
Goes through wall
Jumps wall
Teleports
Which Karel command picks up a ball?
takeBall()
grab()
take()
collect()
A function in Karel helps you:
Repeat behavior with one command
Draw pictures
Store numbers
Turn off Karel
What does RGB stand for?
Red Gray Blue
Red Green Blue
Real Graphic Bytes
Right Green Black
Which number system uses only 0s and 1s?
Decimal
Binary
Hexadecimal
Octal
How many values can one binary digit represent?
1
2
10
256
Hexadecimal digits range from:
0–8
1–10
0–F
A–Z
Which is a valid JavaScript variable declaration?
variable x=5
var x=5
x equals 5
make x 5
What does prompt() do?
Outputs text
Takes input
Random number
Adds numbers
What type of value does prompt() return?
Boolean
Number
String
Null
Which symbol is used for single-line comments?
#
//
/*
<--
What does Math.random() return?
Whole 1–10
Any whole
Decimal 0–1
Negative
Convert Math.random() to number 1–10:
Math.random(1,10)
1+Math.random()*10
random()+10
random(10)
What does a conditional do?
Repeat
Choose options
Store data
Draw
Which means equal to?
B == C
!= D
<>
What is a packet?
Large file
Broken file
Small piece of data
Security tool
The Internet is best described as:
One computer
Network of networks
Wireless cable
What is routing?
Storing files
Directing packets
Protecting data
Randomly sending
Reliable protocol:
HTTP
TCP
CSS
DNS
Protocol that translates domain names:
TCP
DNS
HTML
RBG
Decimal 15 to binary:
1001
1111
0101
1100
RGB yellow:
A (255,255,0)
B (255,0,255)
C (0,255,0)
D (255,128,128)
JavaScript addition operator:
+
-
&
/
*
26. turnLeft() in Karel does the following:
Turns Karel 90 degrees to the left
Moves Karel forward one step
Turns Karel 180 degrees
Makes Karel pick up a beeper
One reason functions are useful is:
They help organize code into reusable blocks.
They make code run slower.
They increase the number of errors in a program.
They make code harder to read.
Convert binary 1010 to decimal.
10
8
12
15
Convert decimal 26 to hexadecimal.
1A
2B
16
1C
An algorithm represents:
a step-by-step procedure to solve a problem
a type of computer hardware
a programming language
a mathematical equation
Difference between high- and low-level languages is:
High-level languages are closer to human language, while low-level languages are closer to machine language.
High-level languages are harder to learn than low-level languages.
Low-level languages are more portable than high-level languages.
High-level languages require more memory than low-level languages.
RGB for pure red.
(255,0,0)
(0,255,0)
(0,0,255)
(255,255,0)
33. Purpose of loops is:
To repeat a set of instructions multiple times
To store data permanently
To display output only once
To terminate the program immediately
34. Why packets arrive out of order.
Due to different network paths and varying transmission delays.
Because packets are always sent in reverse order.
Because the network guarantees in-order delivery.
Because packets are merged before transmission.
35. Why does prompt() return a string?
Because prompt() always returns user input as a string.
Because prompt() is designed to return a number.
Because prompt() returns a boolean value.
Because prompt() returns an object.
Convert hex FF to decimal.
255
256
128
15
Convert binary 11000000 to decimal.
192
128
200
176
38. Example of Boolean expression is:
True
A * B = C
A > B
A = 5
39. Why use conditionals.
To make decisions in a program based on certain conditions.
To repeat a block of code multiple times.
To store data in variables.
To display output to the user.
40. What is a digital footprint.
A record of your online activities and interactions.
A type of computer virus.
A physical mark left on a device.
A password used to access digital accounts.
Write JavaScript code that asks user for name and stores it.
let name = prompt('Enter your name:');
let name = alert('Enter your name:');
let name = confirm('Enter your name:');
let name = input('Enter your name:');
Which JavaScript code correctly generates a random number between 1 and 6?
Math.floor(Math.random() * 6) + 1
Math.random() * 6 + 1
Math.ceil(Math.random() * 6)
Math.floor(Math.random() * 5) + 1
Conditional printing 'You win!' if score > 100.
if score > 100: print('You win!')
if score < 100: print('You win!')
if score == 100: print('You win!')
if score >= 100: print('You win!')
44. To create turnRight(), which of the following uses three turnLeft()?
turnRight() { turnLeft(); turnLeft(); turnLeft(); }
turnRight() { turnLeft(); turnLeft(); }
turnRight() { turnLeft(); }
turnRight() { turnLeft(); turnLeft(); turnLeft(); turnLeft(); }
Karel moves until wall. What does Karel do when it reaches the wall?
Karel stops moving.
Karel jumps over the wall.
Karel turns around.
Karel digs under the wall.
JS code adding a and b.
a + b
a - b
a * b
a / b
JS checking age ≥ 18.
if (age >= 18)
if (age > 18)
if (age == 18)
if (age <= 18)
48. Karel placing 5 balls on same square.
Karel puts 5 balls on one square.
Karel puts 5 balls on five different squares.
Karel puts 1 ball on each of 5 squares.
Karel puts 3 balls on one square.
Packets travel from Client A to Client B by following which path as shown in the diagram?
Through a router connecting both clients
Directly from Client A to Client B without any intermediary
Via a switch that only connects to Client A
Through a firewall that blocks all traffic
Observe the diagram shown. How many blue squares are present in the diagram?
4
5
6
8
