1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Aleks [24]
4 years ago
6

While writing a program to regulate the speed of a self-driving car, you find that your software sometimes miscalculates the ide

al car speed for city streets to be over 1500 MPH (nearly twice the speed of sound), when it should be approximately 30 MPH. Which of the following strategies would be most efficient to employ in debugging your program?
a. At the very end of the speed calculations, add an additional line of code that divides the calculated speed by 50 so that the program never produces such high speeds
b. After each calculation within your program, insert a temporary statement that displays the most recently calculated value. When running your program, compare the displayed values with the expected values to identify where in the program the error is being introduced.
c. Starting at the end of your program and working backwards, systematically delete each line of code that relates to calculating and re-run the program after each deletion to identify where in the program the error is being introduced
d. Delete all of the code relating to speed calculations and rewrite it again
Computers and Technology
1 answer:
Likurg_2 [28]4 years ago
3 0

Answer:

b. <em>After each calculation within your program, insert a temporary statement that displays the most recently calculated value. When running your program, compare the displayed values with the expected values to identify where in the program the error is being introduced.</em>

Explanation:

Logging statements are an effective debugging technique. It is a good way of finding the location of faulty logic in a program.

One can trace the root problem through logging intermediary outputs.

We can find out from where the program is producing unexpected or unintended calculations, when their's a weird output logged.

You might be interested in
Question 2: Describe and Discuss the concepts of Higher order functions and currying in a functional programming language such a
fredd [130]

Answer:

A higher-order function is a type of function in programming that can either accept a function as its parameter or return a function or both. Curring is a process used by functions to accept and access multiple arguments.  

Explanation:

Functional programming languages like Hasket, Javascript, Python, etc,  use the concept of higher-order functions and Curring to accept multiple arguments and functions as parameters and can also return a function.  

4 0
3 years ago
VI. Differentiate between systems SUIwal unu up
siniylev [52]

Answer:

So in a library u might want to get some reading or homework done the way one can use a computer to improve academic preferences is bye one a computer u can type a essay and look for a book

Explanation:

3 0
3 years ago
You are querying a database of manufacturing company suppliers. The column name for supplier identification numbers is supplier_
irina1246 [14]

Queries are used to retrieve data from the database

The correct clause to retrieve only data about the supplier with identification number 85317 is WHERE supplier_id = 85317

<h3>How to determine the query</h3>

The clause is given as:

identification number = 85317

To retrieve data from the database, we make use of the WHERE clause followed by the column name, and the column value

In this case,

supplier_id represents the column name, while 85317 represents the value

Hence, the required clause is

WHERE supplier_id = 85317

Read more about database at:

brainly.com/question/1538272

8 0
2 years ago
Let’s say you’re publishing a message with the Hootsuite Composer. The message contains a link to a landing page, and you want t
myrzilka [38]

Answer:

Ow.ly shortener

Explanation:

Ow.ly is a good example of a link shortener that helps shorten the UTM link in Hootsuite composer.

Cheers

6 0
3 years ago
The best way to safeguard your document is to save it
givi [52]
The answer is C every few minutes
8 0
3 years ago
Other questions:
  • Is the protocol that specifies how web browsers and servers communicate.?
    11·1 answer
  • Special characters that display on the screen but do not print are called _____________
    15·1 answer
  • Which of the following Office Online apps is most effective for creating spreadsheets?
    14·2 answers
  • TOPIC-PYTHON
    8·2 answers
  • Which of the following is NOT a factor to consider when examining extrinsic job satisfaction?
    7·1 answer
  • Assume that a single page of printed text requires 52 lines of text, and that each line of text averaged 80 characters. If each
    9·1 answer
  • Why is it NOT a good practice to save everything on the desktop?
    6·2 answers
  • Manuel owns a small business. He needs to calculate the amount each employee owes in Federal taxes. Manuel should
    11·2 answers
  • Write a public static method named evens that takes in 1 argument int a, and returns a String containing all positive even numbe
    8·1 answer
  • Who requests services and who facilitates services to a client.​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!