NEW
Font size
WorksheetsTri 1 Review
Total questions: 63
Worksheet time: 47mins
Which of the following decimal (base-10) values is equivalent to the binary (base-2) value 101001?
22
37
41
82
What value does the above code segment display?
17
36
53
No value is ever displayed because the algorithm repeats the REPEAT UNTIL block indefinitely.
Which of the following is true about program documentation?
Program documentation is only needed for programs in development; it is not needed after a program is completed.
Program documentation is useful when programmers collaborate but not when a programmer works individually on a project.
Program documentation is useful during initial program development and also when modifications are made to existing programs.
Program documentation should not be changed after it is first written.
Consider the following numbers. Binary 1100, Decimal 11, and Hexadecimal D. Which of the following lists the numbers in order from least to greatest?
Binary 1100, Decimal 11, Hexadecimal D
Decimal 11, Binary 1100, Hexadecimal D
Decimal 11, Hexadecimal D, Binary 1100
Hexadecimal D, Decimal 11, Binary 1100
What does len() do?
It stops the list from continuing
It adds up everything in the list
It counts the amount of values in the list
None of the above
What is % in Python?
Square Root
Modulus
Add
Square Root
This loop can only be used when the programmer knows the number of times a code is to be repeated
while
for
do while
repeat until
for( int i = 0; i < 10; i++)
out.println("hello");
14 >= 14
15 > 15
16 != 16
18 >= 19
Which method puts all items in x in ascending order?
sort(x)
binarySearch(x,y)
equals(x,y)
toString(x)
fill(x,y)
4 5 9 6 2 7
4 5 6 2 7 9
4 5 2 6 7 9
1 4 2 9 3 8 5
What does the list look like after one pass of the bubble sort algorithm.
Which algorithm matches this description: "a sorting algorithm that treats the input as two parts, a sorted part and an unsorted part, and repeatedly inserts the next value from the unsorted part into the correct location in the sorted part."
Selection Sort
Insertion Sort
Merge Sort
Radix Sort
Which algorithm matches this description: "a sorting algorithm that treats the input as two parts, a sorted part and an unsorted part, and repeatedly selects the proper next value to move from the unsorted part to the end of the sorted part."
Selection Sort
Insertion Sort
Radix Sort
Merge Sort
A new or improved idea, device, product, etc, or the development thereof.
Innovation
Technology
Improvement
Protocol
A way of representing information using only two options.
BInary
Doubled
Algorithm
Hexadecimal
American Standard Code for Information Interchange; the universally recognized raw text
ASCII
USACII
QWERTY
IETF
Instructions for a computer.
Code
Comand
Protocol
Direction
What is a conditional?
Makes the Scratch cat touch something
Instructions telling the program what to do
When the Scratch cat touches something
Tests whether something is true or false
This is the action of adding an element to the end of a list or array.
append
addendum
sum
product
Writing code in this type of language often involves dragging and dropping pictorial code, rather than typing text.
block-based language
boolean logic
text-based language
Java
Abstraction
American Standard Code for Information Interchange; the universally recognized raw text format that any computer can understand
A simplified representation of something more complex. Abstractions allow you to hide details to help you manage complexity, focus on relevant concepts, and reason about problems at a higher level.
A group of computers and servers that are connected to each other.
A type of computer that forwards data across a network
When the code is ran, an error occurs due to line 4. What type of error exists in line 4?
Syntax Error
Type Error
Indentation Error
Concatenation Error
There's syntax error in lines 2 and 4. What is the proper correction?
use the == comparing operater
use parenthesis around the condition
use .lower() function for line 1
using str() function for the conditions
There's a syntax error for this program code. What line is it one?
Line 14
Line 1
Line 17
Line 2
The code utilizes the randint() fuction. What line of code should be at the top to be able to use the randint() in line 2?
from random import randint
import randint from random
import randint
import random
