Font size
WorksheetsTSA REVIEW
Total questions: 80
Worksheet time: 4hrs 59mins
What would be displayed after the following code is run?
2
-4
14
4
Determine what is printed by the following code.
8
-16
-12
16
A student wrote the procedure below, which is intended to ask whether a user wants to keep playing a game. The procedure does not work as intended. Which of the following best describes the result of running the procedure?
The procedure returns TRUE when the user inputs the value "y" and returns FALSE otherwise.
The procedure returns TRUE when the user inputs the value "n" and returns FALSE otherwise.
The procedure returns TRUE no matter what the input is.
The procedure returns FALSE no matter what the input is.
Determine what is printed by the following code.
2 1 5
9 1 6
10 4 6
10 1 6
A program is created to perform arithmetic operations on positive and negative integers. The program contains the following incorrect procedure, which is intended to return the product of the integers x and y. A programmer suspects that an error in the program is caused by this procedure. Under which of the following conditions will the procedure NOT return the correct product? SELECT TWO ANSWERS:
When the values of x and y are both.
When the value of x is positive and the value of y is negative.
When the value of x is negative and the value of y is positive.
When the values of x and y are both negative.
In the program below, the initial value of X is 5 and the initial value of Y is 10. What is displayed as a result of running the program?
Foxtrot
Hotel
November
Yankee
The question below uses a robot in a grid of squares. The robot is represented as a triangle, which is initially in the bottom left square of the grid and facing toward the top of the grid. Code for the procedure Mystery is shown below. Assume that the parameter p has been assigned a positive integer value (e.g. 1,2,3...) Which of the following shows a POSSIBLE result of calling the procedure?
Program I displays the correct sum, but Program II does not.
Program II displays the correct sum, but Program I does not.
Both Program I and Program II display the correct sum.
Neither Program I nor Program II displays the correct sum.
Which of the following code segments can be used to move the robot to the gray square?
What is the value of r as a result of executing the code segment?
10
20
30
40
What would be the output from the code show here?
What would be the output from the code show here?
What would appear in the canvas if the following code is run?
Which code shows the correct way to set a shapes position at the center of the canvas?
What will be displayed as a result of this code?
The result is: 31
The result is: 10
The result is: + expression
The result is: 80
Consider the following program, which uses the variables START, END, and CURRENT. What is displayed as a result of executing the program?
1 3
3 3
3 4
4 4
Consider the following code segment, which moves the robot in the grid. Which of the following shows the location of the robot after running the code segment?
What is displayed as a result of executing the code segment?
10 20 30 40
21 30 40 50
21 40 30 40
21 40 30 50
The following question uses a robot in a grid of squares. The robot is represented by a triangle, which is initially facing toward the top of the grid. Which of the following code segments will move the robot to the gray square along the path indicated by the arrows?
On a scale of Baby Yoda, how are you feeling today?
A computer program uses 4 bits to represent nonnegative integers. Which of the following operations would create an overflow error?
4 + 8
5 + 11
9 + 6
7 + 10
12 + 3
When using bits to represent fractions of a number, can you create all possible fractions?
Yes
No
Your computer uses 4 bits to represent decimal numbers (0, 1, 2, 3 and so on) in binary. What is the SMALLEST number for which an overflow error occur?
14
15
16
17
Which of the following is true of how computers represent numbers?
With a fixed number of bits some numbers are too large to represent in a computer which will lead to overflow errors.
Using a fixed but large number of bits can eliminate the possibility of round off error when representing numbers in binary
Using a fixed but large number of bits, for example 128, eliminates the possibility of overflow errors.
With a large but fixed number of bits it is possible to eliminate either round-off errors or overflow errors, but not both.
What is 0110 + 0010
8
9
4
3
An overflow error is where...
0s and 1s... Oh my!
Not enough room memory to store results
Wrong file type
To much room in memory to add everything up
An overflow error can cause...
Correct results
Loss of data
Incorrect results
A glitch in the Matrix
Which of the following is true of intellectual property?
Information created on a computer is not owned by anyone since only analog information is protected under copyright law.
You do not need to cite work created by someone else if both the original work and your use of it are in digital form.
Creative Commons enables content creators to freely distribute their otherwise copyrighted work.
Creative Commons has severely hindered broad and open access to digital information
What does this symbol indicate?
Trademark
Copyright
Service mark
patent
What License does this have?
Attribution-Share Alike License
Attribution-No Derivative Works License
Attribution-Non Commercial-Share Alike License
Attribution-Non commercial-No Derivative Works License
What term is defined here?
What term is defined here?
What term is defined here?
What is invoked when objects are created in order to assign initial attributes for the object?
What is defined here?
What is defined here?
What is the difference between public and private access? Where do you use private? Where do you use public?
What is defined here?
This flowchart is made to ...
Check whether a number is odd or even
Decide if we like a number or not
Calculate the remainder of a number + 2
Help people with Maths
3
6
10
18
It will be different each time you run it
All done.
Inside the If.
Inside the if.
All done.
Inside the else.
All done.
Inside the if.
Inside the else.
All done.
3
6
10
18
It will be different each time you run it
y + z + " and " + x
sentence
BoysHello Girls
Hello Boys and Girls
Hello Girls and Boys
Inside first if
Inside second if
Inside first if
Inside second if
Nothing will be printed
It will be different each time
9
21
81
nothing is printed
this script would cause an error
What is displayed as a result of executing the code segment?
true false false
true false true
true true false
true true true
A process comprised of independent components working together to transform an input to an output is ...
Algorithm
Output
Program
System
The process of considering something independently of its associations or attributes is ...
Pseudocode
Abstraction
Innovation
Unambiguous
What is specific enough to not be interpreted in more than one way?
Ambiguous
Unambiguos
Selection
System
What is repetition?
Sequence
Selection
Iteration
A diagram that is representation of an algorithm is ....
Flowchart
Pseudocode
System
Component
What is a new method, idea, product, etc., or the creation?
Innovation
System
Selection
Iteration
Which description best describes what this program does?
This program sums up the integers from 8 to 15 (inclusive).
This program sums up the integers from 2 to 8 (inclusive).
This program multiplies the integers from 8 to 15 (inclusive).
This program sums up the integers from 8 to 14 (inclusive).
What does HTML stand for?
Hyperlink and Text Markup Language
Hyper Text Makeup Language
Hyper Text Markup Language
High-level Text Markup Language
Which tag is used to define a hyperlink in HTML?
<link>
<url>
<a>
<hlink>
What is the purpose of the HTML <head> element?
To define the main content of the HTML document
To contain metadata about the HTML document
To define a header section in the HTML document
To include external scripts and stylesheets
