After a few hours of tinkering with a program, you realize that you have introduced a lot of problems. You want to go back to what the program was like before you began working on it. Which of these will make that possible?
scientific library
development life cycle
version control system
documentation
29 answers
version control system
What is the purpose of a version control system?
The purpose of a version control system is to track and manage changes to files and code over time. It allows multiple people to collaborate on a project, keep track of different versions of the project, and revert to previous versions if needed. It provides a systematic way of handling code changes and helps maintain the integrity and stability of the software.
You are reviewing a Python program that includes this line of code: import numpy. Which of the following is this program most likely to contain?
The program is most likely to contain scientific or numerical computations or data manipulations. numpy is a popular Python library that provides efficient and convenient functionalities for working with large, multi-dimensional arrays and matrices, as well as a collection of mathematical functions to operate on these arrays. It is commonly used in fields such as data science, scientific research, and engineering.
What will this line of code do?
numpy.sum(item_prices)
numpy.sum(item_prices)
This line of code will compute the sum of the values in the array or list "item_prices" using the sum() function provided by the numpy library. The sum() function takes an array-like object as input and returns the sum of all the values in that object. In this case, it will sum up all the elements in the "item_prices" array and return the total sum.
Which statement is the best description of this structure?]
[[0, 1, 2], [3, 4, 5], [6, 7, 8]] [ [[0, 1, 2], [3, 4, 5], [6, 7, 8]]]
(1 point) [ (1 point)]
Responses [ Responses]
It is one array consisting of numbers. [ It is one array consisting of numbers.]
It is one array consisting of numbers. [ It is one array consisting of numbers.]
It is an array that consists of three other arrays. [ It is an array that consists of three other arrays.]
It is an array that consists of three other arrays. [ It is an array that consists of three other arrays.]
It will not work in Python due to the double brackets. [ It will not work in Python due to the double brackets.]
It will not work in Python due to the double brackets. [ It will not work in Python due to the double brackets.]
It will not work in Python due to the missing comma. [ It will not work in Python due to the missing comma.]
[[0, 1, 2], [3, 4, 5], [6, 7, 8]] [ [[0, 1, 2], [3, 4, 5], [6, 7, 8]]]
(1 point) [ (1 point)]
Responses [ Responses]
It is one array consisting of numbers. [ It is one array consisting of numbers.]
It is one array consisting of numbers. [ It is one array consisting of numbers.]
It is an array that consists of three other arrays. [ It is an array that consists of three other arrays.]
It is an array that consists of three other arrays. [ It is an array that consists of three other arrays.]
It will not work in Python due to the double brackets. [ It will not work in Python due to the double brackets.]
It will not work in Python due to the double brackets. [ It will not work in Python due to the double brackets.]
It will not work in Python due to the missing comma. [ It will not work in Python due to the missing comma.]
It is an array that consists of three other arrays. [ It is an array that consists of three other arrays.]
Which statement about importing part of a library is correct?
(1 point)
Responses
There is no way to import just part of it.
There is no way to import just part of it.
There is no advantage to it.
There is no advantage to it.
It’s likely to lead to errors.
It’s likely to lead to errors.
It can be more efficient.
(1 point)
Responses
There is no way to import just part of it.
There is no way to import just part of it.
There is no advantage to it.
There is no advantage to it.
It’s likely to lead to errors.
It’s likely to lead to errors.
It can be more efficient.
It can be more efficient.
What will this line of code do?
numpy.average(quiz_scores)
(1 point)
Responses
create a variable called quiz_scores to hold the average
create a variable called quiz_scores to hold the average
average an array called quiz_scores
average an array called quiz_scores
add the variable average to the array called quiz_scores
add the variable average to the array called quiz_scores
add the variable quiz_scores to the average
numpy.average(quiz_scores)
(1 point)
Responses
create a variable called quiz_scores to hold the average
create a variable called quiz_scores to hold the average
average an array called quiz_scores
average an array called quiz_scores
add the variable average to the array called quiz_scores
add the variable average to the array called quiz_scores
add the variable quiz_scores to the average
This line of code will calculate the average of the values in the array or list called "quiz_scores" using the average() function provided by the numpy library. The average() function takes an array-like object as input and returns the average of all the values in that object. In this case, it will calculate the average of the values in the "quiz_scores" array and return the result.
What will this line of code do?
numpy.average(quiz_scores)
(1 point)
Responses
create a variable called quiz_scores to hold the average
average an array called quiz_scores
add the variable average to the array called quiz_scores
add the variable quiz_scores to the average
numpy.average(quiz_scores)
(1 point)
Responses
create a variable called quiz_scores to hold the average
average an array called quiz_scores
add the variable average to the array called quiz_scores
add the variable quiz_scores to the average
The correct response is:
average an array called quiz_scores
average an array called quiz_scores
Which term describes the process of creating a program’s specific details first and then combining them into a whole?
(1 point)
Responses
procedural programming
procedural programming
object-oriented programming
object-oriented programming
top-down programming
top-down programming
bottom-up programming
(1 point)
Responses
procedural programming
procedural programming
object-oriented programming
object-oriented programming
top-down programming
top-down programming
bottom-up programming
The term that describes the process of creating a program's specific details first and then combining them into a whole is top-down programming.
Object-oriented programming means that the program is organized around _____ instead of _____.
Object-oriented programming means that the program is organized around objects instead of procedures or functions.
Object-oriented programming means that the program is organized around _____ instead of _____.
(1 point)
Responses
functions, data
functions, data
data, functions
data, functions
libraries, APIs
libraries, APIs
APIs, libraries
(1 point)
Responses
functions, data
functions, data
data, functions
data, functions
libraries, APIs
libraries, APIs
APIs, libraries
Object-oriented programming means that the program is organized around data instead of functions.
What is the final step in the program development life cycle?
(1 point)
Responses
Design a new solution.
Design a new solution.
Ask users for feedback.
Ask users for feedback.
Document the process.
Document the process.
Maintain the code.
Maintain the code.
(1 point)
Responses
Design a new solution.
Design a new solution.
Ask users for feedback.
Ask users for feedback.
Document the process.
Document the process.
Maintain the code.
Maintain the code.
The final step in the program development life cycle is to maintain the code.
Which statement about code libraries is accurate?
(1 point)
Responses
You are required to check out the code from its owner.
You are required to check out the code from its owner.
There will be a due date for the code.
There will be a due date for the code.
The code is written by someone other than the user.
The code is written by someone other than the user.
A licensing fee must be paid.
(1 point)
Responses
You are required to check out the code from its owner.
You are required to check out the code from its owner.
There will be a due date for the code.
There will be a due date for the code.
The code is written by someone other than the user.
The code is written by someone other than the user.
A licensing fee must be paid.
The code is written by someone other than the user is an accurate statement about code libraries. Code libraries are pre-written collections of code that users can access and utilize in their own programs. These libraries are typically developed by other individuals or organizations and made available to users for various purposes such as providing specific functionalities or facilitating common tasks. Users can incorporate these libraries into their own code to save time and effort in writing code from scratch.
What is the purpose of documentation?
(1 point)
Responses
to store copies of all of the previous versions of the code
to store copies of all of the previous versions of the code
to make code more Pythonic
to make code more Pythonic
to record how much time it took to develop the code
to record how much time it took to develop the code
to explain what the code does
(1 point)
Responses
to store copies of all of the previous versions of the code
to store copies of all of the previous versions of the code
to make code more Pythonic
to make code more Pythonic
to record how much time it took to develop the code
to record how much time it took to develop the code
to explain what the code does
The purpose of documentation is to explain what the code does. Documentation provides written information about the code, including its functionality, usage, and any important considerations or limitations. It serves as a reference for developers and users to understand how to use the code, its intended purpose, and any specific instructions or guidelines. Documentation can include explanations, examples, and usage scenarios to help users effectively utilize the code.
Which of these would be done if using top-down programming?
(1 point)
Responses
writing a function and then testing it
writing a function and then testing it
breaking a problem down into pieces
breaking a problem down into pieces
developing a test and then writing a function
developing a test and then writing a function
creating program details first
(1 point)
Responses
writing a function and then testing it
writing a function and then testing it
breaking a problem down into pieces
breaking a problem down into pieces
developing a test and then writing a function
developing a test and then writing a function
creating program details first
Breaking a problem down into pieces would be done if using top-down programming. Top-down programming involves starting with an overall problem and breaking it down into smaller, more manageable sub-problems or tasks. This approach focuses on understanding the high-level structure and logic of the program before delving into the specific details of implementation. By breaking the problem down into smaller pieces, it becomes easier to design and develop the program incrementally.