1/96
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
What number will be output by the console.log command on line 7?
100
What text will be output by the program?
Less than 30
"You win!" never displays. What line is responsible for this error?
3
This function chooses the screen to display based on the score. What is the correct way to call this function?
checkWin
Why are parameters useful when programming?
Parameters allow for more flexible, generalized behaviors in functions.
Which of the following is true of functions?
Functions can help remove repeated code from a program
What is stored in studentScores after running the program code?
[82, 0, 0, 97, 91]
A school is developing a program to keep track of information about students and their class schedules. In which of the following instances would a data abstraction be most helpful?
The program includes individual variables to store the names of each student rather than a single list of students.
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?
16
Under which of the following conditions is it most beneficial to use a heuristic approach to solve a problem?
A)When the problem cannot be solved in a reasonable time and an approximate solution is acceptable
B)When the problem cannot be solved in a reasonable time and an exact solution is needed
C)When the problem can be solved in a reasonable time and an exact solution is needed
D)When the problem can be solved in a reasonable time and an approximate solution is acceptable
A)When the problem cannot be solved in a reasonable time and an approximate solution is acceptable
What best describes how computing devices represent information?
A computer represents data as bits which is either a 0 or a 1
Which of the following is NOT true of how computers represent complex information?
Abstraction helps represent complex information by surfacing complexity that might otherwise be hidden
When visiting a museum Lian takes a photo of a painting with a smartphone which stores the photo as an image file. Which of the following best describes the differences between the painting itself and the photo of the painting stored on the smartphone?
The photo is a digital representation of the analog painting
The following is true of how computers represent numbers
When a fixed number of bits some numbers are too large to represent in a computer which will lead to the overflow errors
Convert the binary (base-2) number 1001 to decimal (base-10)
9
convert the decimal (base-10) number 20 to binary (base-2)
10100
Which of the following binary (base-2) numbers is LARGEST?
11000000
How many of the total numbers can be represented with an 8-bit binary (base-2) system?
256
Which of the following is true of lossy and lossless compression algorithms?
Lossy compression algorithms are typically better than lossless compression algorithms at reducing the number of bits needed to represent a piece of data
Jorge is sending a large image file as part of a shared classroom project. Which of the following is most likely true if Jorge opts to compress the image before sending it?
The image will require fewer bits in order to be represented.
The image will require fewer bits in order to be represented.
The following statement is true of intellectual property
Creative commons enables content creators to freely distribute their otherwise copyrighted work
Lucy is completing a project as part of a science class using materials she found online. The following is MOST LIKELY to lead to legal consequences.
Using images posted online by another student without permission or citation.
Ryan is designing an app that needs to quickly send low quality photos between users. Most smartphones take much higher quality photos than Ryan needs for his app. The following is the type of compression Ryan should choose and why.
Lossy compression since it typically results in smaller data sizes.
Arman takes a picture with his smartphone which he subsequently posts online. Beatrice finds the picture online and posts a copy of it on her website with an attached Creative Commons license. The following best describes who owns the photos
Arman owns the photos because he was the original creator and did not license the work.
Which of the following best describes the protocols used on the Internet?
D. The protocols of the Internet are open and used by all devices connected to the network
Jesse purchases a new smartphone and is immediately able to use it to send a photo over the Internet to a friend who lives in a different country. Which of the following is NOT necessary to make this possible?
B. A single direct connection is established between any two devices connected to the Internet
Which of the following is true of how the Internet has responded to the increasing number of devices now using the network?
A. The Internet protocols are changed every year to adapt to the new devices that have been connected to the network
B. While the number of devices connected to the Internet has grown, the network itself has not grown
C. The protocols of the Internet were designed to scale as new devices are added
D. The protocols of the Internet are no longer necessary thanks to the large number of devices now connected to the network
C. The protocols of the Internet were designed to scale as new devices are added
Which of the following is true of how packets are sent through the Internet?
B. Packet metadata is used to route and reassemble information traveling through the Internet
Emilee is watching an online video. The video is being sent to her laptop by a server over the Internet which splits the video into packets and sends them in the order they appear in the video. Which of the following is true about how the packets will arrive at her computer?
D. The packets may arrive out of order
Which of the following best describes the purpose of an IP address?
A. IP addresses provide a unique number for identifying devices that send and receive information on the Internet
Which of the following Internet protocols is MOST important in reassembling packets and requesting missing packets to form complete messages?
A. Transmission Control Protocol (TCP)
Which of the following Internet protocols is used to request and send pages and files on the World Wide Web?
D. HyperText Transfer Protocol (HTTP)
Two devices are connected to the Internet and communicating with one another. A squirrel chews through one of the wires in the network that is currently being used by the devices to communicate. The network immediately begins using a different path through the network and communication continues as normal.This situation best exemplifies which principle?
A. fault-tolerance
An Internet Service Provider (ISP) is a company that builds routers and wired connections that allow individuals to access the Internet. An ISP is considering adding additional redundant connections to its network. Which of the following best describes why the company would choose to do so?
C. Redundant networks are more reliable
Which of the following situations is most likely to cause issues arising from the digital divide?
A. A state makes voter registration forms available only by visiting a government website
Which of the following is MOST likely to be an outcome of the digital divide?
B. People from some racial or ethnic groups have unequal access to computing technology.
Which of the following best explains how messages are typically transmitted over the Internet?
B. The message is broken into packets. The packets can be received in any order and still be reassembled by the recipient's device.
Which of the following is a primary reason for the use of open protocols on the Internet?
D. Open protocols provide a way to standardize data transmission between different devices.
Which of the following best describes the relationship between the World Wide Web and the Internet?
C. The World Wide Web is a system of linked pages, programs, and files that is accessed via a network called the Internet.
Which of the following best explains how fault tolerance in a network is achieved?
B. By providing multiple paths between devices, enabling routing to occur even in the presence of a failed component
Which of the following best explains how the Internet is a fault-tolerant system?
B. The Internet is fault-tolerant because there are usually multiple paths between devices, allowing messages to sometimes be sent even when parts of the network fail
Which of the following is a primary benefit of making a computing system fault-tolerant?
A.If one component of the system fails, users of the system can often still access it.
Which of the following actions is most likely to help reduce the digital divide?
B. Deploying satellites and other infrastructure to provide inexpensive Internet access to remote areas of Earth
Which of the following is LEAST likely to be a contributing factor to the digital divide?
C. Some parents prefer to limit the amount of time their children spend using computing devices or the Internet.
Which of the following actions is most likely to be effective in reducing the digital divide at a local level?
C. Providing free community access to computers at schools, libraries, and community centers
In which of the following stages of the development process is a team MOST likely to interview a potential user of an app?
A. investigating and reflecting
Which of the following best describes the purpose of a design specification?
C. Describing the requirements for how a program will work or users will interact with it
What will the "background-color" of the "topButton" be when the program is finished running?
C. blue
If the user does NOT click the button what color will "topButton" be when this program finishes running?
B. blue
The following program is run. Then the user clicks the "topButton" button ONCE. What will be displayed in the console?
C.catdogbird
The following program is run. Then the user clicks the "bottomButton" ONCE and then clicks the "topButton" ONCE. What will be displayed in the console?
D.cccbbbaaa
The following program is run. Then the user clicks the "bottomButton" TWO TIMES. What will be displayed in the console?
B.bbbdddcccccc
Which line of code in this program is MOST likely to result in an error?
B. Line 2
Which of the following BEST describes the differences between sequential and event-driven programming?
D. In sequential programming commands run in the order they are written. In event-driven programming some commands run in response to user interactions or other events.
Which of the following is NOT a reason to include comments in programs
A. Comments help the computer decide whether certain components
What number will be output by the console.log command on line 5?
16
What number will be output by the console.log command on line 5??
35
What text will be output by the program??
Output D
What will be the order of letters printed to the console when this program is run?
abcbc
When this function is called, the smaller of two numbers is displayed. What Boolean expression would not work in line 12 in order to accomplish this goal?
num1 == num2
There is repeated code in these onEvent blocks. Choose the correct code for the updateScreen() function which would be called in each of the onEvent blocks.
function updateScreen() {setText("counter_label", "counter");if (counter == 0) {setProperty("counter_label", "font-size", 24);}}
A movie theater charges different ticket prices based on a customer's age. The prices are shown in the table below.The customer's age is stored in the variable age and the price is stored in the variable price. Which piece of code will correctly decide the price for each ticket.
if (age >= 65) {price = 6;} else if ((age > 12)) {price = 8;} else {price = 5;}
A museum charges different prices based on the day of the week and age of the visitor. The pricing rules are shown below.On Tuesday and Thursday children 10 and under get in free ($ 0).For all other days and ages the cost is ten dollars ($ 10).The visitor's age is stored in the variable age, the day of the week is stored in a variable day, and the price in dollars is stored in the variable price. Which piece of code will correctly decide the price for each ticket.
if ((day == "Tuesday" || day == "Thursday") && (age <= 10)){price = 0;} else {price = $10;}
What will the value of the variable bags be at the end of the flowchart shown here?
2
Choose the correct definition for Conditional Statement
affects the sequential flow of control by executing different statements based on the value of a Boolean expression
Which of the following is true of functions??
Functions can help remove repeated code from a program
Programming languages have some similarities and differences to the "natural" language you use in everyday speech. Select the two true statements about programming languages:
A. Ambiguities in natural language necessitate the creation of programming languages for controlling a computerB. Compared to the number of words in a natural language, the number of defined words in a programming language is very small.
Which of the following images shows the path and ending location of the robot that will result from executing the code above. The starting location of the robot is shown as dotted triangle for cases where the robot does not start and end at the same location
picture
Consider the following incorrect program, which is intended to move the robot around the perimeter of a grid, as indicated by the drawing below. The starting position and direction of the robot is indicated in the diagram.
Line 3 and Line 4
Which of the following is NOT true about functions in programming?
C. Functions cannot make calls to other functions within the same program.
What is one important naming convention of functions?
C. A function name should be as descriptive as possible to indicate what the function does.
Which one of the following statements about functions is TRUE?
E. Two functions in a single program can have different names but contain identical code.
Which of the following will call the function drawStar?
B. drawStar();
For this scenario related to turtle drawing, indicate whether it is better to write a loop or a function (or a set of functions) to handle the taskDrawing out the letters of a word
Function
For this scenario related to turtle drawing, indicate whether it is better to write a loop or a function (or a set of functions) to handle the task:
Loop
For this scenario related to turtle drawing, indicate whether it is better to write a loop or a function (or a set of functions) to handle the task: Drawing 100 tiny dots in a line.
Loop
For this scenario related to turtle drawing, indicate whether it is better to write a loop or a function (or a set of functions) to handle the task:Drawing a circle of any size at any point on the screen.
Function
Why are parameters useful when programming??
B. Parameters allow for more flexible, generalized behaviors in functions.
What is the most likely outcome of running the code shown at the right?
What is the most likely outcome of running the code shown at the right?
When programmers work together, what is an example of how abstraction in programming can promote collaboration?
C. Programmers can use functions created by their partners, relying on the functionality without needing to know the specific details of how the function is implemented.
Which of the following images represents the most likely output produced by the code segment given below?
B. Function with squares on top of each other and turtle is facing left. (Less complicated pic)
Explain how abstraction allows for the creation of increasingly complex systems. Reference top-down design strategy in your response.
Through the use of abstraction, a programmer can take a large idea and break it down into smaller pieces. In top down design, the programmer can create one function made up of smaller functions, but after creating the smaller functions, he/she no longer needs to know how they work, just that they do work.
A photographer stores digital photographs on her computer. In this case the photographs are considered the data. Each photograph also includes multiple pieces of metadata including:
c. Filter photos to those taken of buildings
Due to computer error, the Time metadata for all of the photographs is accidentally set to the same time of day. The other pieces of metadata and the data itself are not affected by the error. Which of the following is MOST likely to be the result of this problem?
c. The photographer will not be able to filter to photographs taken in the morning
Which column of data might be able to be visualized or analyzed but first would need to be cleaned?
b. How Long
A restaurant is interested in learning about the food preferences of people living nearby to the restaurant and intends to use survey data to help decide which new items to add to the menu. Which of the following is LEAST likely to be part of the process used to analyze the data?
a. Cleaning a data visualization to remove unwanted patterns
The bank intends to develop the algorithm using machine learning techniques. The algorithm will be trained using data from past loan decisions made by human bankers.Which of the following best describes whether this algorithm will include bias?
c. The algorithm will likely reflect the human biases in the data used to train it
The next three questions all refer to the same dataset described below.A school is conducting a survey of students to learn more about how they get to school. Students were asked how they travel to school, how long it takes them to get to school, what time they arrive at school, and for a description of their most significant challenges when traveling to school. Several rows of the data collected are shown in the table below.Which column is data will likely be most difficult to visualize or analyze?
d. Biggest Challenges
Which information could likely NOT be found with the data collected?answer choicesa. Whether students who are new to the school take longer to get to school than other students
a. Whether students who are new to the school take longer to get to school than other students
The chart above shows the frequency of searches for the words "pencil" and "pen" over a 5 year period. Which of the following is the best interpretation of the chart above?
d. At any point in time there are typically more people searching for the word "pen" than "pencil"
The mayor of a city is interested in learning what goals are most important for residents of the city. Members of her staff visit one of the many neighborhoods in the city and ask 20 residents to fill out a survey. The mayor is concerned that the survey may be biased and not accurately reflect the overall interests in her town. Which of the following strategies is MOST likely to address concerns about the data being biased or inaccurate
c. Visiting multiple new neighborhoods to collect more survey responses
In which of the following situations would parallel systems MOST likely be used to help analyze data?
c. Data analysis involving large datasets
The next two questions refer to the following chart.The chart below has a single point for every breed of dog. Each point indicates the maximum weight of that breed and the maximum number of years that breed of dog lives to.Which of the following conclusions is BEST supported by the scatter plot?
a. Dog breeds with a higher maximum weight tend to have shorter maximum lifespans
Which of the following conclusions is BEST supported by the scatter plot?answer choicesa. Most dogs breeds have a maximum weight of 100 lbs or moreb. Most dog breeds have a maximum life span of 10 or fewer yearsc. All dog breeds that weigh less than 50 pounds have a maximum lifespan of more than 10 yearsd. No dog breeds that weigh more than 150 pounds are expected to live more than 10 years.
c. All dog breeds that weigh less than 50 pounds have a maximum lifespan of more than 10 years
The histogram chart below has a single bar for every state in the United States. Each state is placed in a bucket, or range, based on its area in square miles.Which of the following conclusions is BEST supported by the histogram chart?
d. The most common size of states is between 50,000 and 100,000 square miles
A researcher is interested in learning more about the different kinds of plants growing in different areas of the state she lives in. The researcher creates an app that allows residents of the town to photograph plants in their area using a smartphone and record date, time, and location of the photograph. Afterwards the researcher will analyze the data to try to determine where different kinds of plants grow in the state.Which of the following does this situation best demonstrate?
a. Citizen science
A town decides to publicize data it has collected about electricity usage around the city. The data is freely available for all to use and analyze in the hopes that it is possible to identify more efficient energy usage strategies.Which of the following does this situation best demonstrate?
c. Open Data