1/192
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
What are the four components of computational thinking?
· Decomposition- breaking down a complex problem or system into smaller, more manageable parts.
· Pattern Recognition- Looking for similarities among and within problems.
· Abstraction- Focusing on the important information only, ignoring irrelevant detail.
· Algorithms- Developing a step by step solution to the problem, or the rules to follow to solve the problem.
What is a computer?
· Devices that store, retrieve, and process data.
A set of instructions that a computer can execute is known as what?
Algorithms
1) What is the role of a programming language?
· Provide a way to create programs for a computer.
What is IDE?
· An integrated development environment (IDE) is software for building applications that combines common developer tools into a single graphical user interface (GUI).
1) What are some of the general components of an IDE?
-Compiling and building tools
-Code completion/insight
-Resource Management
-Debugging tools
A language that changes code to machine readable code one command at a time is known as what time of language?
Interrupted
What are the specific rules for programming languages when constructing programs in that language?
Syntax
Segments of code that are not executed by a computer and help make the problem easier to read are known as?
comments
What are areas of code where names, such as variables, are valid and what are two examples used to define these areas?
Scope
Whitespace(Tab)
{}
What type of scope is visible throughout the entire program?
Global
One may run into errors as they write a program. The act of looking for these errors is known as what?
Debugging
What are the three general types of errors?
1) Compiling
2) Run Time
3) Logic
The following is a segment of code:
If(sum <=50)
What are some possible tests cases, using edge casing, for this segment of code?
49, 50, 51
What are names that refer to values in the scope of a program?
Variables
Which of the following are valid variables names?
a. CowsEat4u
b. #1Fan
c. CS_For_AR
d. 411info
e. Stars Fall
f. num1
A, C, F
What is the process of assigning a value to a variable known as?
Initialization
Which if the following are correct variable declaration and initialization in our pseudocode? (Pick one)
a. num int <-- 20
b. 20 <-- int num
c. Int num <-- 20
d. Int num = 20
e. 20 = int num
C
What is the data type of the following values ( Integer, float, string, character, and boolean):
a. 56
b. 'Z'
c. 1.01
d. "Snake"
e. false
f. 450901023146632546
g. 0.00000000000000000000000001
h. "5120"
i. '4'
j. "true"
a. int
b. char
c. float
d. string
e. boolean
f. int
g. float
h. string
i. char
j. string
What are the missing data types in the following variable declarations and initializations in pseudocode?
a. _________ num <-- 4
b. ________ age <-- "34"
c. ________ hungry <-- true
a. int
b. string
c. boolean
Evaluate the following expressions:
a. 1-10 / 5-2
b. Integer Division: 25/2
c. 5 % 3
d. 10 % 5
e. 5*3 % 2
a. -3
b. 12
c. 2
d. 0
e. 1
What is the segment of code that can be called multiple times in various places inside of a program?
Procedure
Just because a procedure is defined does not mean it will execute. How do you execute a procedure in a program?
Call the procedure
What are collections of premade code that can be imported into a program for use in that program?
Libraries
A program generates a "random" number from a generator that uses a predetermined list of numbers and formulas. What type of number generator is being used?
What possible code can be inserted into the *missing code* section that will produce the following output? (n is any even integer)
int x <-- n
if(*missing code*)
print "The number is even"
else
print "The number is odd"
end if
Output: "The number is even."
x % 2 = 0
x % 2 (does not equal) 1
What is the output for the following segment of pseudocode?
int num <-- 2
if(num < 5)
print "Pikachu"
else
if (num < 10)
print "Bulbasar"
end if
end if
end if
"Pikachu"
What are the four general parts to every loop?
1) Initialization
2) condition
3) Action Block
4) increment
Consider the following segment of pseudocode with the missing code:
for(*missing code*)
print "I will not skateboard in the halls"
end for
If the string "I will not skateboard in the halls." executes 500 times, what might the missing code be?
(int i <-- 0 ; i < 500 ; i <-- i + 1)
Classify the following loops as a pretest or post test loop.
a. While loop
b. For loop
c. Do-While loop
a. pretest
b. pretest
c. posttest
What type of procedure calls itself inside of its definition?
Recursive
Consider the following pseudocode:
void h (int n)
if(n >= 4)
h(n/2)
end if
print n
end h
h(16)
what is the output from the pseudocode?
2,4,6,8
Linked lists use basic construct (object) known as __________. This object stores a ____________ and a reference to the next __________.
Node
Variable
Node
When working with a linked list where does the computer/program start in the link list?
Head
In a basic (singly) linked list, flow goes which way through the list?
From the head to the tail.
How does the computer/program know when it reaches the end of a linked list?
The last node will return null.
To increase the efficiency of adding items to the end of a list, what can be used and why does it increase the efficiency?
A tail can be used that points to the end of the list. It helps provide quick access to the end of the list so the program does not have to traverse the entire list.
Which of the following requires the longest runtime on a linked list that has a tail:
a. inserted a node at the front of the linked list?
b. Inserting a node at the end of a linked list?
c. Delete the last node from the linked list?
D. You will have to traverse down the list to the node before the last node to reference null.
Classify the following as linked list, array or both:
Stored in dynamic memory
Linked list
Classify the following as linked list, array or both:
Is a data structure
both
Classify the following as linked list, array or both:
Structure can grow or shrink
Linked list
Classify the following as linked list, array or both:
Can access items anywhere in structure quickly using indexing
Array
Classify the following as linked list, array or both:
Uses less memory than its counterpart of the same length.
Array
Classify the following as linked list, array or both:
Has to find enough memory in contiguous memory for the entire structure.
Array
Classify the following as linked list, array or both:
Can store a series of strings.
both
What are the three basic operations that can be performed on a stack data structure?
Push, Pop, Peek
When a program pop from a stack, which value is removed?
The last value added.
When a program adds to the queue, where is the value added?
To the end of the queue.
What are the three basic operations that can be performed on a queue?
Enqueue, dequeue, peek
poll, offer, peek
Stacks are _____ and queues are _______.
LIFO
FIFO
What data structure uses keys and corresponding values?
Dictionary
What is a data structure that uses edges and vertices?
graph
Binary trees are examples of what data structure?
graph
In OOP, the process of one class acquiring properties from another class is known as what?
Inheritance
In OOP, what is the ability to process objects differently depending on their data type or class?
Polymorphism
A(n) ___________ is to a blueprint as a(n) _________________ is to a house.
Class, object
Which of the following are OOP capable languages?
a. Python
b. C
d. Swift
d. Fortran
A, C
Which type of programming paradigm centers on flow being determined by events?
Event-driven
Constructing classes and instantiating objects from those class is an example of what type of programming paradigm?
OOP
Indicate the type of search or sort for the following statement:
Compares an number in a list to its neighbor to the right. It will swap the item if it is greater than its neighbor. As passes continue, larger values seem to travel to the right of the list of values.
Bubble sort
Indicate the type of search or sort for the following statement:
Has an average-case performance of O(n^2).
Bubble sort, insertion sort, and selection sort
Indicate the type of search or sort for the following statement:
A search that has to be presorted before it will work
Binary Search
A divide and conquer sort algorithm that divides list into smaller partitions until one item is inside each list. It then merges the smaller lists into larger list until one sorted list remains.
Merge Sort
Has an average-case performance of O(nlog^2n).
Merge sort and quick sort
What is the terminating case (ends he recursive call) inside of a recursive function?
Base Case
Searches an unsorted part of a list to find the best item for a specific location in the list (e.g. smallest number to the first index). If there is a better item for the specified location, the items are swapped.
Selection Sort
A program generates a "random" number from a generator that uses a predetermined list of numbers and formulas. What type of number generator is being used?
pseudo-random
What networking hardware device directs the data leaving the network on where to go over the internet to other networks
Router
What type of network connects devices over a relatively short distance and this type of network is commonly found in homes and small businesses.
LAN (Local Area Network)
What are some advantages/disadvantages of storing data in the cloud compared to storage on a local network?
Advantages are data backup if local machine crashes, not limited to local machine memory sizes can access from different devices. Disadvantages are that you need internet access.
Identify the protocol for the following statement:
A set of rules that govern the format of data sent over the internet.
A) SMPT
B) DHCP
C) IP
D) FTP
E) TCP
IP (Internet Protocol)
Identify the protocol for the following statement:
A protocol that is used to transfer and manipulate files on the internet.
A) SMPT
B) DHCP
C) IP
D) FTP
E) TCP
FTP (File Transfer Protocol)
Identify the protocol for the following statement:
A protocol for e-mail messages on the internet.
A) SMPT
B) DHCP
C) IP
D) FTP
E) TCP
SMTP (Simple Mail Transverse Protocol)
Identify the protocol for the following statement:
Assigns internet addressed to computers and user.
A) SMPT
B) DHCP
C) IP
D) FTP
E) TCP
DHCP (Dynamic Host Configuration Protocol)
Identify the protocol for the following statement:
A set of rules that governs the delivery of data over the internet and sets up a connection between the sending and receiving computers.
A) SMPT
B) DHCP
C) IP
D) FTP
E) TCP
TCP (Transmission Control Protocol)
Identify if the following IPv4 addresses are valid or invalid:
a). 255.255.255.255
b) 1.0.234
c) 192.156.12.10
d) 1e4:10:f119:8a2e:560:7b2a:1
a) Valid
b) Invalid
c) Valid
d) Valid
e) Invalid
Answer the following question in regards to data being transferred over the internet:
What is data broken down into and transferred over the internet as?
Data Packets
Answer the following question in regards to data being transferred over the internet:
Do data packets all take the same route to get to the target machine?
No
Answer the following question in regards to data being transferred over the internet:
What happens if the receiving device is missing a packet?
It request the sender to send that packet of data again.
A file 4.5KB in size. What is the files probable file type?
a) Text
b) Image
c) Audio
d) Video
A) Text
Which of the following is a video file format?
a) .xls
b) .jpeg
c) .mp3
d) .wmv
D) .wmv
Exactly 2KB is exactly how many bytes?
2048 Bytes
Convert the following binary number to their decimal equivalent:
10100
20
Convert the following binary number to their decimal equivalent:
1100111
103
Convert the following binary number to their decimal equivalent:
101
5
Convert the following binary number to their decimal equivalent:
111
15
Convert the following binary number to their decimal equivalent:
110110
54
Convert the following binary number to their decimal equivalent:
1011
11
Convert the following binary number to their decimal equivalent:
100111101100
2540
Transforming data from a higher level language to machine language so a computer can use is an example of what?
encoding
IF the ASCII decimal value for A is 65 and the value for 'a' is 97, what is the ASCII decimal value for E?
69
A file is compressed and its file size shrinks slightly. However, it can be decompressed back to it original file size. What type of compression may have occurred?
Lossless
What us lossless compression?
Lossless compression reduces a file's size with no loss of quality. This seemingly magical method of reducing file sizes can be applied to both image and audio files. Lossless compression basically rewrites the data of the original file in a more efficient way. However, because no quality is lost, the resulting files are typically much larger than image and audio files compressed with lossy compression. For example, a file compressed using lossy compression may be one tenth the size of the original, while lossless compression is unlikely to produce a file smaller than half of the original size.
What is lossy compression?
Lossy file compression results in lost data and quality from the original version. Lossy compression is typically associated with image files, such as JPEGs, but can also be used for audio files, like MP3s or AAC files. The "lossyness" of an image file may show up as jagged edges or pixelated areas. In audio files, the lossyness may produce a watery sound or reduce the dynamic range of the audio.
Because lossy compression removes data from the original file, the resulting file often takes up much less disk space than the original. For example, a JPEG image may reduce an image's file size by more than 80%, with little noticeable effect. Similarly, a compressed MP3 file may be one tenth the size of the original audio file and may sound almost identical.
Identify the following file type as taking advantage of lossless or lossy data compression:
PNG
Lossless
Identify the following file type as taking advantage of lossless or lossy data compression:
JPEG
Lossy
Identify the following file type as taking advantage of lossless or lossy data compression:
GIF
Lossy
Identify the following file type as taking advantage of lossless or lossy data compression:
WAV
Lossless
What is the process of converting data into a form that is unreadable?
Encryption
What is the difference between encoding and encryption?
Encoding is transforming data from one format to another and the information is not kept secret.
Encryption is transferring data into a form that can only be read by specific individuals and the information is meant to be kept secret.