This is the decimal equivalent of the binary number 1010.
What is 10?
This type of compression allows for perfect reconstruction of the original data.
What is lossless compression?
This programming method executes code in response to user actions.
What is event-driven programming?
This is the purpose of the Transmission Control Protocol (TCP).
What is track IP packets to make sure all arrive and are in the proper order?
This is an example of overflow error in computing.
This will be the outcome of the following code:
var x = 10
if x > 5:
print("Greater")
else:
print("Smaller")
What is "Greater"?
This is 1 % 5.
What is 1?
This many numbers can be represented using a 6-bit binary system.
What is 64?
This is why lossy compression is often used for image files.
Why is:
- Lossy compression often compresses files to smaller sizes.
This line of code is most likely to cause a syntax error:
var x = 5,
console.log(x),
if x = 5,
x++?
what is
if x = 5
?
This is how metadata is used in data packets.
What is provide to and from IP addresses and packet order and number information?
This decimal number causes overflow in a 4-bit binary system.
What is anything over 15?
The following code will print what if the input is 7? var input = promptNum("Enter a number: "));
if (input % 2 == 0){
console.log("Odd");
} else {
console.log("Even");
}
What is "Even"? (The programmer needs to fix this code...)
This is displayed after the code is run:
list ⬅ [5, 8, 7, 5]
buzz ⬅ 0
FOR EACH value IN list
{
if( value > 7 )
{
buzz ⬅ buzz + 1
}
}
DISPLAY( buzz )
What is 1?
This is the decimal number 45 converted to binary.
What is 101101?
This is an example of when lossless compression would be essential.
Various Correct Responses...
This is why comments are used in code.
What is helps the reader of the code better understand what's going on?
This principle allows a network to continue functioning if part of it fails.
What is fault tolerance?
This is the difference between overflow and round-off errors.
-Overflow is when you have too few bits to represent a value.
-Roundoff is when a number is too small to represent accurately.
Given the following code, this is the value of y:
var x = 3;
var y = 0;
if (x < 5){
y = x * 2
}else {
y = x + 2;
}
console.log(y);
What is 6?
This is an outcome of the Digital Divide.
What is lack of access to the internet.
This is the largest of the following in binary: 110110, 111011, 101010.
What is 111011?
This compression algorithm typically reduces file sizes more significantly.
What is a lossy compression algorithm?
This will be the outcome of this code:
var x = 3
var y = 5
var z = 2
console.log((x + y)%z);
What is 0?
This is how scalability impacts the performance of a network.
What is as a network grows, the network works in the same way.
This is why using more bits in a system reduces errors.
What is there will be less of a chance of having overflow errors?
This will be the outcome of this code:
var counter = 7;
evenOdd();
console.log(counter);
function evenOdd() {
for(var i = 0; i < 3; i++) {
var counter++;
}
}
What is the code won't run?
These are 3 causes of the digital divide.
What are:
- Inability to afford internet access.
- Living in an area where internet access does not exist.
- Lack of knowledge of how to use a device to access the internet.
- Physical disability that makes using a device to access the internet impossible
This happens when a number exceeds the storage capacity of a 5-bit system.
What is an overflow error?
This is the key trade-off of lossy compression.
This will be the outcome from running this code:
var numList = [2, 3, 20, 18];
if(numList[2] % numList[1] <= numList[0]){ console.log(numList[3]);
}else {
console.log(numList[1]+numList[2];
}
What is 18?
This is the role of an IP address in internet communication.
What is allowing communication between machines on the internet by giving each machine its own address?
The numbers 7 and 8 are added together. The value is then stored in 4 bits.
This is the outcome of this process.
What is the value 15 is accuratley represeented.
This will be the value of thud when the program finishes running.
values ⬅ [5, 12, 1, 0, 10, 4, 1]
thud ⬅ 0
baz ⬅ 0
FOR EACH value IN values
{
baz ⬅ baz + 1
if( value ≤ 4 )
{
thud ⬅ baz
}
}
DISPLAY( thud )
What is 7?
This is why Mr. Stansbery is so awesome.
Various Answers...