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
Var1 = 1<br> var2 = 2<br> var3 = "3"<br> print(var1 + var2 + var3)
Savatey [412]

Explanation:

omg it's Python, I don't like it

I would say the answer is 33 or 6

5 0
3 years ago
What is the purpose of a career portfolio?
morpeh [17]

Answer:

To provide relevant information in a job interview

Explanation:

4 0
3 years ago
What is an unique text-based internet address corresponding to a computer's unique numeric IP address called
FromTheMoon [43]

Answer:

This is called a domain name

Explanation:

A domain name is an address used by internet users to access a website.

6 0
3 years ago
Should I download RAM on my computer?
jenyasd209 [6]

Well, if you want to, make sure it's safe.

I don't know what RAM really is, but check if it's safe first. And maybe talk it out with your parents.

That's all I gotta say!

7 0
3 years ago
Read 2 more answers
In creating a professional action plan it's important to
blagie [28]
Whenever creating a professional action plan, it might be easier to do an "if...then..." plan, or just a daily plan, like this:

Monday:
Kitchen:
 Do dishes
 Sweep floor
 Wipe counters

Bedroom:
 do laundry etc,
5 0
3 years ago
Other questions:
  • Your dad just purchased a new desktop with Windows 8 Professional. He is calling you, informing you that he is unable to remote
    9·1 answer
  • Algorithm for converting decimal into binary.
    7·1 answer
  • Universal Containers is tracking the interviewer's ratings of candidate in Salesforce. They would like to easily link the Candid
    5·1 answer
  • 1. Itemise the order in which BASIC executes arithmetic operation.
    13·1 answer
  • What’s the most popular operating system
    9·2 answers
  • A production house needs an operating system that captures saves and generates information within a specific time. Which type of
    11·1 answer
  • An important communication principle states ""prepare before you communicate."" How should this preparation manifest itself in t
    10·1 answer
  • In a swap you need a variable so that one of the values is not lost ? Need help
    7·2 answers
  • 1. Software that is designed to intentionally cause harm to a device, server, or network is A. outware B.loggerware C.
    12·1 answer
  • Display the Approval Form worksheet and create an IF statement in cell B13 to determine if the applicant is eligible for a perso
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!