wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Intro to Computer Science Final Exam 2026

Total questions: 48

Worksheet time: 24mins

Name
Class
Date
1.
1) What would be the output of running the following code (assuming all import statements are present)?
a)
Option 1
b)
Option 2
c)
Option 3
d)
Option 4
2.
2) What attribute do we need to set to ‘center’ in the styleSheet if we want the items inside to be centered vertically? (Assume flexDirection is set to column)
a)
height
b)
alignItems
c)
justifyContent
d)
The default is for items to be aligned vertically, so no additional attribute is needed.
3.
3) What line of code would need to be included on line 32 in order to create the following phone output?
a)
justifyItems: 'center'
b)
alignItems: 'center'
c)
justifyContent: 'center'
d)
alignContent: 'center'
4.
4) What would be the output when the following code is run?
a)
Option 1
b)
Option 2
c)
Option 3
d)
Option 4
5.
5) What attribute(s) are missing from the container stylesheet below in order to produce the following output?
a)
justifyContent: 'center' AND alignItems: 'center'
b)
justifyContent: 'center' AND flexDirection: 'column'
c)
alignItems: 'center' AND flexDirection: 'row'
d)
flexDirection: 'row'
6.
6) What attribute changes the font color of text?
a)
backgroundColor
b)
textColor
c)
fontColor
d)
color
7.
7) What is the difference between fontWeight and fontSize?
a)
fontWeight controls the boldness of the text while fontSize controls how large or small each character is.
b)
fontWeight is used to make text italic while fontSize is used to make text bold.
c)
fontWeight controls how large or small each character is while fontSize controls the boldness of the text.
d)
fontWeight controls the boldness of the text underline while fontSize controls how large or small each character is.
8.
8) When the above program is run, the text is written with one word on each line vertically. What is one change that would not keep the title ‘My Mobile App’ all on one line?
a)
Increase the width of the box
b)
Use alignItems: 'center' inside the redBox style
c)
Decrease the font size
9.
9) On what line in the following code is the parent View container opened?
a)
Line 8
b)
Line 9
c)
Line 14
d)
Line 15
10.
10) What additional attribute(s) could be used inside the label style to alter the text?
a)
fontFamily: "Times New Roman"
b)
textFamily: "Times New Roman", AND textWeight: 10,
c)
fontFamily: "Times New Roman", AND fontColor: "white"
d)
textFamily: "12pt Times New Roman", AND textColor: "white"
11.
11) If we wanted the boxes in the layout below to line up horizontally instead of vertically and wanted them to be centered on the screen, which attributes would need to be included inside the parent view container style?
a)
alignItems: 'center', AND flexDirection: 'row',
b)
alignItems: 'center', AND justifyContent: 'center'
c)
justifyContent: 'center', AND flexDirection: 'column', AND alignItems: 'center'
d)
alignItems: 'center', AND justifyContent: 'center', AND flexDirection: 'row'
12.
12) Which of the following text styles for redText is written correctly if we want the color of the text to be red with a size of 25?
a)
Option 1
b)
Option 2
c)
Option 3
d)
Option 4
13.
13) A TouchableHighlight component’s primary purpose is...
a)
to make a button display on the screen
b)
to be a wrapper for any other component to make that component react to presses or clicks
c)
to track where the user presses the screen
d)
to cause all of the text on the app to be highlighted when you touch the screen
14.
14) What will happen when the button in the following code is pressed?
a)
An alert will pop up that says ‘Homepage’.
b)
Nothing
c)
There is nothing clickable on the screen when this program is run.
d)
It will take the user to the homepage.
15.
15) Why are View components often referred to as containers?
a)
They contain all of the logic for an app.
b)
The often contain other nested components.
c)
The contain all of the user data for an app.
d)
View components are required to have container in their Stylesheet identifier name.
16.
16) Which of the following Stylesheet objects has the correct syntax for a Text component?
a)
Option 1
b)
Option 2
c)
Option 3
d)
Option 4
17.
17) What is the primary purpose of a View component?
a)
View components hold, or contain, other components to create complex layouts.
b)
View components are the only components that let you view your app.
c)
View components hold, or contain, all of the information of an app.
d)
There can only be one View component, the parent View container, which contains all other components for an app.
18.
18) Which is the correct output for the following code?
a)
Option 1
b)
Option 2
c)
Option 3
d)
Option 4
19.
19) What needs to be added to the style of the main container to make the letters go horizontal instead of vertical?
a)
alignItems: 'center',
b)
justifyContent: 'center',
c)
flexDirection: 'row',
d)
flexDirection: 'column',
20.
20) What will be the output of the following code?
a)
Option 1
b)
Option 2
c)
Option 3
d)
Option 4
21.
21) An app in App Inventor should display the name of every 5th student in a class of 20, starting with the 5th student. Which block of code will correctly accomplish this?
a)

Option 1

Option 1

b)

Option 2

Option 2

c)

Option 3

Option 3

d)

Option 4

Option 4

22.

22) Which of the following procedure blocks can be used to reduce redundancy in the event handler code shown below?

a)

A

b)

B

c)

C

d)

D

23.

23) Which of the following blocks of code accomplish the task shown in the flowchart below?

a)

A

b)

B

c)

C

d)

D

24.
24) Which of the following best describes the role of the Navigator in pair programming?
a)
Controls the keyboard
b)
Helps point out coding errors to the Driver
c)
Controls the mouse
d)
Dictates the code to the Driver
25.
25) When creating a program, how does the use of comments help debug problems later?
a)
Comments show where a bug is located in the code
b)
Comments enable and disable code in the program
c)
Comments describe the purpose and desired outcome of the code
d)
Comments include code that the program can execute when it runs into errors
26.
26) Which of the following components can be used to trigger an event handler when the device is shaken?
a)
Location sensor
b)
Accelerometer sensor
c)
Clock
d)
Spinner
27.
27) Which of the following computational items is used to temporarily store values in a program?
a)
Variables
b)
Procedures
c)
Databases
d)
For Loops
28.
28) Which of the following computational items can be used to reduce the redundancy of the code below?
a)
Variable
b)
Event Handler
c)
Database
d)
For Loop
29.
29) In which view do you see what the app will look like on a mobile device?
a)
Designer View
b)
Blocks View
c)
Components View
d)
Backpack View
30.
30) True or False: When an MIT App Inventor is connected to a mobile device through the companion app, it will always start on Screen1.
a)
True, because Screen1 acts as the home screen for all apps.
b)
True, because the programmer has coded the app to start on Screen1.
c)
False, the app always starts on whichever screen you are currently working on.
d)
False, the app starts on a random screen.
31.
31) What is a tag?
a)
A header that is automatically named by the program.
b)
A header that is named by the programmer.
c)
A flag to notify the programmer of an error
d)
A piece of metal worn around a dog's neck.
32.
32) Which of the following blocks of code would be used to "hide" a button?
a)
Option 1
b)
Option 2
c)
Option 3
d)
Option 4
33.
33) Which of the following is NOT an example of a conditional statement?
a)
If you give a mouse a cookie then he will want some milk.
b)
If it is raining outside, then I will bring my umbrella.
c)
If I am hungry, then I will play video games.
d)
A clock automatically running the background of a program.
34.
34) What is the period in which a program is running? (from when the program opens until it is closed)
a)
Flowchart
b)
Open time
c)
Program time
d)
Runtime
35.
35) What is the name of an algorithm that works in most (all) situations?
a)
Universal algorithm
b)
Mathematical algorithm
c)
Flowchart algorithm
d)
Boolean algorithm
36.
36) What is a linear algorithm?
a)
An algorithm that is used to write a linear expression.
b)
An algorithm that follows a single path of procedures.
c)
An algorithm that follows a set of questions to determine the correct procedure.
d)
An algorithm that can be written as a flowchart.
37.
37) What is a visual diagram that can be used to represent an algorithm?
a)
A map
b)
A variable table
c)
A flowchart
d)
A graph
38.
38) You are creating an app where you want the user to be able to enter their name before starting. Which component would be the most appropriate for this?
a)
Textbox
b)
Label
c)
Button
d)
TextToSpeech
39.
39) whatIsThisAnExampleOf?
a)
Poor writing
b)
A run-on
c)
Hippo case
d)
Camel case
40.

40) Which of the following GoButton.Click blocks populates ColorsLabel with the colors listed in colorsList, separated by commas?

a)

A

b)

B

c)

C

d)

D

41.
41) Which of the following describes a type of list that contains pre-set data that does not change while the app is running?
a)
Static List
b)
Dynamic List
c)
Variable List
d)
Random List
42.
42) Which of the following is the increment for the loop below?
a)
Number
b)
From
c)
To
d)
By
43.
43) Which set of blocks of code represents the flowchart below?
a)
A
b)
B
c)
C
d)
D
44.

44) Using the code below, which of the following event handlers will display “Clean up room” in the ChoreLabel every time the ChoreButton is clicked?

a)

A

b)

B

c)

C

d)

D

45.
45) Which of the following event handlers will play an audio file when a check box is clicked in App Inventor?
a)
A
b)
B
c)
C
d)
D
46.
46) Which of the following statements correctly describes the event for the event handler shown?
a)
A button being clicked
b)
The app speaking the message “I’m shaking!”
c)
The accelerometer sensing shaking
d)
The app displaying the message “I’m shaking!”
47.

47) An app developer wants to create the code for a check box component that when selected (checked), turns a label component’s background color to red; when not checked turns the label component’s background color to blue. Which of the following flowcharts is the correct way to show the algorithm for this behavior?

a)

A

b)

B

c)

C

d)

D

48.

48) Which of the following event handlers accomplishes the behavior described in the question above?

a)

A

b)

B

c)

C

d)

D