WorksheetsCoding 1 Semester 1 Exam
Total questions: 53
Worksheet time: 40mins
Sequential Programming
program statements run in order, from top to bottom.
data that are sent to a computer for processing by a program. Can come in a variety of forms, such as tactile interaction, audio, visuals, or text.
a collaborative programming style in which two programmers switch between the roles of writing code and tracking or planning high level progress
the inputs and outputs that allow a user to interact with a piece of software. Can include a variety of forms such as buttons, menus, images, text, and graphics.
Comment
form of program documentation written into the program to be read by people and which do not affect how a program runs.
the inputs and outputs that allow a user to interact with a piece of software. Can include a variety of forms such as buttons, menus, images, text, and graphics.
a collection of program statements. Programs run (or “execute”) one command at a time.
a written description of how a command or piece of code works or was developed.
True or False you can get into legal trouble for using images posted online by another student without permission or citation.
True
False
True or False Creative Commons does not enable content creators to freely distribute their otherwise copyrighted work.
True
False
Variable
holds one value at a time
a combination of operators and values that evaluates to a single value
allows a program to change the value represented by a variable
temporary can only be used in the part of the code where it was created like inside and on event.
Global Variable
permanent can be used anywhere in your code
temporary can only be used in the part of the code where it was created like inside and on event.
data type that is either True or False
a combination of operators and values that evaluates to a single value
Local Variable
temporary can only be used in the part of the code where it was created like inside and on event.
Evaluates to either True or False
Your code doesn't follow the rules of programming language
permanent can be used anywhere in your code
Boolean Value
data type that is either True or False
permanent can be used anywhere in your code
A command that executes the code within a function
<, >, <=, >=, ==, != indicate a Boolean expression
Boolean Expression
Evaluates to either True or False
Your code doesn't follow the rules of programming language
Your code follows the rules of the programming language but doesn't do what you intend
A command that executes the code within a function
Syntax Error
Your code doesn't follow the rules of programming language
Your code follows the rules of the programming language but doesn't do what you intend
A named group of programming instructions AKA "Procedure"
Evaluates to either True or False
Logic Error
Your code follows the rules of the programming language but doesn't do what you intend
A named group of programming instructions AKA "Procedure"
<, >, <=, >=, ==, != indicate a Boolean expression
part of most programming languages and include addition, subtraction, multiplication, division, and modulus operators.
Function
A named group of programming instructions AKA "Procedure"
A command that executes the code within a function
part of most programming languages and include addition, subtraction, multiplication, division, and modulus operators.
part of most programming languages and include addition, subtraction, multiplication, division, and modulus operators.
string
Any sequence of characters between quotation marks.
The common programming structure that implements "conditional statements".
holds one value at a time
performs the modulo operation between two numbers. It is represented by the % sign. The modulo operation finds the remainder. For example, 5 MOD 2 or 5%2 returns the value of 1. The remainder of 5 divided by 2 is 1.
if-statement
The common programming structure that implements "conditional statements".
tests whether or not two values are not equal if they are not it is true. Otherwise it is false
A command that executes the code within a function
Evaluates to either True or False
an ordered collection of elements
List
Element
Index
Variable
comparison operators
<, >, <=, >=, ==, != indicate a Boolean expression
part of most programming languages and include addition, subtraction, multiplication, division, and modulus operators.
performs the modulo operation between two numbers. It is represented by the % sign. The modulo operation finds the remainder. For example, 5 MOD 2 or 5%2 returns the value of 1. The remainder of 5 divided by 2 is 1.
Any sequence of characters between quotation marks.
arithmetic operators
part of most programming languages and include addition, subtraction, multiplication, division, and modulus operators.
performs the modulo operation between two numbers. It is represented by the % sign. The modulo operation finds the remainder. For example, 5 MOD 2 or 5%2 returns the value of 1. The remainder of 5 divided by 2 is 1.
Any sequence of characters between quotation marks.
The common programming structure that implements "conditional statements".
MOD
performs the modulo operation between two numbers. It is represented by the % sign. The modulo operation finds the remainder. For example, 5 MOD 2 or 5%2 returns the value of 1. The remainder of 5 divided by 2 is 1.
Any sequence of characters between quotation marks.
The common programming structure that implements "conditional statements".
allows a program to change the value represented by a variable
&&
AND
Less than or equal to
OR
NOT
| |
OR
AND
Greater than
Greater than or equal to
!
NOT
tests whether or not two values are not equal if they are not it is true. Otherwise it is false
AND
Less than
!=
tests whether or not two values are not equal if they are not it is true. Otherwise it is false
NOT
Less than or equal to
Greater than
Lossy compression
a method of data compression in which the size of the file is reduced by eliminating data in the file.
a class of data compression algorithms that allows the original data to be perfectly reconstructed from the compressed data.
a sequence of direct connections.
As a byte is either a 0 or 1
Lossless compression
a method of data compression in which the size of the file is reduced by eliminating data in the file.
a class of data compression algorithms that allows the original data to be perfectly reconstructed from the compressed data.
a sequence of direct connections.
As a byte is either a 0 or 1
computing devices represent information
a method of data compression in which the size of the file is reduced by eliminating data in the file.
a class of data compression algorithms that allows the original data to be perfectly reconstructed from the compressed data.
a sequence of direct connections.
As a byte is either a 0 or 1
path
a method of data compression in which the size of the file is reduced by eliminating data in the file.
a class of data compression algorithms that allows the original data to be perfectly reconstructed from the compressed data.
a sequence of direct connections.
As a byte is either a 0 or 1
True or False The protocols of the Internet were designed to scale as new devices are added
True
False
a machine that can run a program
computing device
computing system
computing network
Expression
a group of computers working together for a common purpose
computing device
computing system
computing network
Expression
a group of connected computers that can send or receive data
computing device
computing system
computing network
Expression
a combination of operators and values that evaluates to a single value
computing device
computing system
computing network
Expression
Which of the following binary (base-2) numbers is LARGEST?
11000000
01111111
00000001
10111111
Which of the following is true of lossy and lossless compression algorithms?
Lossy compression algorithms are used when perfect reconstruction of the original data is important.
Lossy compression algorithms are typically better than lossless compression algorithms at reducing the number of bits needed to represent a piece of data.
Lossless compression algorithms are only used to compress text data.
Lossless compression algorithms only allow for an approximate reconstruction of the original data.
What do creative commons licenses allow people to do?
Allows users to distribute, remix, adapt and build upon the material in any medium or format with no conditions
You do not need to cite work created by someone else if both the original work and your use of it are in digital form.
Enables content creators to freely distribute their otherwise copyrighted work.
Severely hindered broad and open access to digital information
Which of the following is true of how the Internet has responded to the increasing number of devices now using the network?
The Internet protocols are changed every year to adapt to the new devices that have been connected to the network
While the number of devices connected to the Internet has grown, the network itself has not grown
The protocols of the Internet were designed to scale as new devices are added
The protocols of the Internet are no longer necessary thanks to the large number of devices now connected to the network
Which of the following Internet protocols is used to request and send pages and files on the World Wide Web?
Transmission Control Protocol (TCP)
Internet Protocol (IP)
User Datagram Protocol (UDP)
HyperText Transfer Protocol (HTTP)
Which of the following best describes the purpose of an IP address?
IP addresses provide a unique number for identifying devices that send and receive information on the Internet
IP addresses assist in the reconstruction of a message that has been divided into many packets
IP addresses indicate the location where an internet-connected computing device was manufactured
IP addresses indicate how many times an individual packet has been requested by a router
Which of the following best describes the purpose of a design specification?
Tracking errors that arise through user testing
Documenting comments that will need to be added to a program
Describing the requirements for how a program will work or users will interact with it
Listing detailed questions that will be asked of users during interviews
What will the “background-color” of the “topButton” be when the program is finished running?
Red
Orange
Blue
Green
The following program is run. Then the user clicks the "topButton" button ONCE. What will be displayed in the console?
cat bird dog
dog cat bird
cat dog bird
bird cat dog
Which line of code in this program is MOST likely to result in an error?
Line 1
Line 2
Line 3
Line 4
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?
cow pig chicken
cow chicken pig
pig cow chicken
chicken pig cow
Which of the following BEST describes the differences between sequential and event-driven programming?
In sequential programming commands run one at a time. In event-driven programming all commands run at the same time.
In sequential programming commands run faster than in event-driven programming.
In sequential programming each command is run many times in sequence. In event-driven programming all commands are run a single time as an event.
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.
Expression
a combination of operators and values that evaluates to a single value
allows a program to change the value represented by a variable
permanent can be used anywhere in your code
holds one value at a time
"You win!" never displays. What change would fix this issue?
Line 1 - change variable name to totalScore
Line 3 - remove var
Line 4 - change conditional to score >= 5
Line 5 - change to a getText command
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?
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
stores information as a numbstores information as a number, String, or Booleaner, String, or Boolean
joins together two or more strings end-to-end to make a new string
an ordered sequence of characters
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:
Date: The date the photograph was taken
Time: The time the photograph was taken
Location: The location where the photograph was taken
Device: Which camera the photo was taken with
Which of the following could the photographer NOT do based on this metadata?
Filter photos to those taken in the last week
Filter photos to those taken in a particular country
Filter photos to those taken of buildings
Filter photos to those taken with her favorite camera
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
Finding the same people surveyed previously to ask more detailed questions.
Visiting the same neighborhood to collect more survey responses
Visiting multiple new neighborhoods to collect more survey responses
Having her staff collect the data using an app rather than paper surveys
A bank is developing an algorithm that will help them decide who to make loans to. As input the algorithm will consider information about the person applying for the loan and the amount of money requested, and as output the algorithm will decide whether the bank should give that loan.
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?
The algorithm will not be biased because using machine learning eliminates human biases
While the algorithm may be biased, the eventual decision made by the algorithm will not be
The algorithm will likely reflect the human biases in the data used to train it
Machine learning algorithms cannot be developed using biased data so if there is bias in the data it will be impossible to develop the algorithm
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?
Citizen science
Crowdfunding
Open data
Machine Learning
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?
Citizen science
Crowdfunding
Open data
Machine Learning
