Font size
WorksheetsAPCSP All Questions
Total questions: 112
Worksheet time: 2hrs 11mins
Octal Number System
Which of the following is TRUE regarding lossless and lossy compressions?
An example of lossless compression is a .jpg file
Lossless uses inexact approximations while lossy does not·
You can completely reconstruct lossless but not lossy compression ·
You can completely reconstruct lossy but not lossless compression
Which of the following is FALSE regarding file sizes?
1 Terabyte = 1,000 kilobytes
1 Petabyte = 1,000 Terabytes
1 Megabyte = 1,000 bytes
1 Terabyte = 1,000 gigabytes
Your best friend has 50 small images to send to you; each of which is 500 KB. How much space do they take up overall in MB?
25 MB
250 MB
2.5 MB
25,000 MB
Approximately how much bigger (how many more bytes) is a megabyte than a kilobyte?
1,000 times bigger
10,000 times bigger
100,000 times bigger
1,000,000 times bigger
____________ are used in the place of IP address because they are easier to remember by humans.
Domain names
Protocols
Routers
Hosts
How does the Internet know where to send data?
IP
TCP
ISP
none of these
Which IP addressing system has more addresses?
IPv4
IPv5
IPv6
IPv7
How many bits are in an IPV4 address?
32
64
128
256
Routers do not monitor current network conditions in determining the fastest route for packets to take in reaching their destinations.
True
False
When a packet arrives at a destination computer, an acknowledgement is sent to the sender by the __________, letting them know they don’t need to resend that packet.
DNS
TCP
IP
HTML
In the Lesson 11 activity with the Internet Simulator, you sent 8-ASCII-characters worth of data across to another person. What types of challenges did this present (answer two of the following)?
Packets have a maximum size
You could only send letters of the alphabet and not numbers
Some percentage of packets were dropped no matter what
Packets have a minimum size
According to the domain name system (DNS), which of the following is a subdomain of the domain titanpride.com?
about.titanpride.com
titanpride.co.uk
titanpride.com.org
titanpride.org
Which is NOT a benefit in splitting up messages into packets?
It guarantees that the message will arrive in order to it's destination
It's easier to reroute individual packets if a faster route opens up
Lesser change the lines get clogged up with a single large message
Only a small amount of data would need to be resent if a small packet is corrupted or dropped
Consider the following segment given in pseudo code (see reference from previous question):
IF (grade >= 70)
{
DISPLAY("You passed!")
}
ELSE
{
IF(grade <= 70){
DISPLAY("Time to start studying again!")
}
}
What will be displayed if grade is set to 70?
You passed!
Time to start studying again!
You passed! and Time to start studying again!
Nothing will be displayed
What is the output of the following JavaScript code segment?
var str1 = "5";
var str2 = "5";
var result = str1 + str2;
console.log(result);
10
error on str1 + str2: type mismatch
55
result
When is a compound condition using the logic operator AND true?
When either of the conditions are true
When both of the conditions are false
When both of the conditions are true
When the NOT operator is also used
Which of the following is FALSE regarding ELSE IF statements?
You add an ELSE IF when you have another condition you want to check.
You are limited to only one ELSE in your code
Each condition in an ELSE IF is checked from top to bottom
The final ELSE clause is executed if all the previous conditions evaluated to false.
Which of the following statements regarding AND/OR operators are FALSE?
true && true = true
true && false = true
false || true = true
false || false = false
Which of the following statements regarding AND/OR/NOT operators are TRUE?
!(true) = true
true || true = false
false && true = true
false || true = true
Based on the following, determine whether each expression is TRUE or FALSE
var season= “Spring”;
!(season== “Summer”)
True
False
Based on the following, determine whether each expression is TRUE or FALSE
var season= “Spring”;
!(3 > 2)
True
False
Based on the following, determine whether each expression is TRUE or FALSE
var score= 80;
(score != 90) && (score > 70)
True
False
Based on the following, determine whether each expression is TRUE or FALSE
var score= 80;
(score > 90) && (score < 100)
True
False
Based on the following, determine whether each expression is TRUE or FALSE
var month = “March”;
(month == “Mar”) || (month== “March”)
True
False
Based on the following, determine whether each expression is TRUE or FALSE
var month = “March”;
(month== “April”) || (10<12)
True
False
UI Elements include all of the following EXCEPT:
Images
Functions
Pull Down Menus
Text Boxes
It's important to understand in Event-Driven programming that:
Only Users trigger events
Only Events trigger code
Both Users trigger events and events trigger code
Neither Users trigger events or events trigger code
Which of the following would be both a descriptive AND acceptable ID to give to a button you want to insert?
1startButton
start Button1
start_button_1
button1
Which of the following is FALSE with regards to the command console.log?
You can use this command in sending messages to yourself to verify the program is doing what you think it's doing which helps prevent errors down the line.
Using this command is a way to debug your program
This command cannot be used in determining potential errors down the line in your programming
Console.log is a way to display a simple plaintext output
Trace the code, and choose the option that correctly shows what will be displayed.
1 var a = 4;
2 var b = 8;
3 var c = 10;
4 a = a + b;
5 b = a + b;
6 c = a + b;
7 console.log ("a:" + a + "b:" + b + "c:" + c);
a = 12, b = 20, c = 32
a = 12, b = 12, c = 12
a = 4, b = 12, c = 16
a = 12, b = 20, c = 24
Look at the following:
var age = "20 + 5"
As a result of the above, using this variable throughout the remainder of this program would result in a value of 25.
True
False
In the above picture, this would be an example of a:
Local Variable
Nested Variable
Global Variable
Variable Scope
In the above picture, this would be an example of a:
Local Variable
Nested Variable
Global Variable
Variable Scope
The following would be considered an example of a string:
'This is an example of a string'
True
False
Read the following line of code:
var statement = "Hello my name is " + firstName);
This would be considered an example of:
concentrate
concatenate
conditional statement
selection
Looking at the code above, where will the robot end up?
None of these images
Looking at the code above, where will the robot end up?
None of these images
Looking at the code above, where will the robot end up?
None of these images
Looking at the coding that takes place above, why are these functions an example of abstraction?
Creating the code above helps you think of your code at a higher level, making sure you don't get lost in all the little details
You are able to "box up" and name the code necessary to draw the rectangle
Once the function has been tested and it works, you don't have to worry about the details of how it works anymore
All of these choices are true
In creating the snowflake you see above, which of the following function names would probably NOT be used in your code?
drawSnowflake()
drawBranch()
drawCross()
Any of these three (functions can be named however you want)
Bandwidth is the transmission capacity of a computer network. (How wide the internet highway is)
TRUE
FALSE
Convert the decimal 128 to binary:
10000000
01111110
10000001
11001100
Convert the decimal 65 to binary:
01100001
00100001
01000001
00100101
Convert the decimal 254 to binary:
11110000
11111100
11111111
11111110
Convert the binary number 00010001 to decimal:
17
27
37
47
Convert the binary number 11001100 to decimal:
224
134
104
204
Convert the binary number 00100100 to decimal:
26
36
46
56
The number of bits that are conveyed or processed per unit of time:
Latency
Bit rate
Speed
4G
Which of these is the correct sequence for the place values for binary numbers?
1, 2, 4, 8, 16, 32, 64, 128
1, 2, 4, 6, 8, 10, 12, 14, 16
1, 2, 3, 4, 5, 6, 7, 8
0, 1
How high can you count in binary?
As high as you want
Up to 128
Up to 2
Up to 256
During your Lesson 3 Activity in sending binary messages, you sent 4 bits to your partner while another 4 bits came back from them as well. This back and forth exchange took a total of 16 seconds. Calculate the bit rate of this entire transmission.
.5 bits/second
2 bits/second
4 bits/second
.25 bits/second
The technical word in computer science for a set of rules governing the exchange or transmission of data between devices is called:
Procedures
Terms
Binary
Protocol
We learned in Lesson 3 (with the flashlight single test) that all of the following are problems or issues you may run across with your binary messages EXCEPT:
Speed
Timing
Reaching the limit on how many bits can be sent
Coordination
As you learned when creating your number system in Lesson 4, you must have the following for this system to work EXCEPT:
Can only include 1 and 0
An agreement on the fundamental ordering of the symbols
A set of unique symbols
What is the minimum number of bits you would need to encode the 26 letters of the alphabet plus a space -- for a total of 27 characters?
2 bits
3 bits
5 bits
6 bits
With regards to representing digital data, the same value (number) can have a different representation depending on the number system used to represented it.
TRUE
FALSE
8 bits is enough to represent 256 different numbers. How many total bits do you need to represent 512 (twice as many) numbers?
9 bits
10 bits
16 bits
17 bits
Look at the partial chart above of the ASCII values. According to ASCII character encoding, which of the following letters is represented by the 8-bit binary value: 0100 0010
ASCII Character A
ASCII Character B
ASCII Character D
The table does not contain the value presented by this binary number
Above is an image from Google Trends that plots Cats and Dogs.
Which of the following is NOT a reasonable conclusion you can come up with looking at this chart?
The sharp spike in dogs trends could be due to an increase in dog attack stories during that year
This chart proves that people love dogs more than they do cats
People search for dogs more than they do cats
It's possible there were more funny dog videos than cat videos during this period of time
What does the "s" in "https" refer to?
It's the plural of http - a more robust version of http that runs on multiple channels.
s is for "secure" - a version of http that is encrypted.
s is for "simple" - a simplified version of http that runs faster on modern computers
s is for "standard" - to distinguish the original http from non-standard versions like httpv and httpx s is for "standard" - to distinguish the original http from non-standard versions like httpv and httpx
Which makes for a password that is harder to crack?
A word from the dictionary
8 random characters that include numbers and punctuation
A 16-character password that is all letters of the alphabet
A 150-character password that is all the same character
This type of cipher involves a shift for each letter of the plaintext where the amount of shift is determined by the “key” which translates letters of the alphabet to an amount of shift:
Caesar Cipher
Random Substitution Cipher
Vigenere Cipher
Public Key Encryption Cipher
This type of cipher shifts the alphabet by some number of characters:
Caesar Cipher
Random Substitution Cipher
Vigenere Cipher
Public Key Encryption Cipher
This type of cipher maps each letter of the alphabet to a randomly chosen other letters of the alphabet:
Caesar Cipher
Random Substitution Cipher
Vigenere Cipher
Public Key Encryption Cipher
Which of the following passwords is the strongest?
3456789
COHS_18#
ilovecomputerscience
abc1234_#Z
