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
zhuklara [117]
3 years ago
5

Why is code tracing important when debugging?

Computers and Technology
1 answer:
larisa [96]3 years ago
7 0

It helps reveal the flow of execution of your program, including results of in-between evaluations. In other words, you can see what your program is doing, and why it takes the decisions it is taking.

If something unexpected happens, the trace will show you the sequence of events that lead to it.

You might be interested in
A file concordance tracks the unique words in a file and their frequencies. Write a program that displays a concordance for a fi
victus00 [196]

Answer:

I am writing a Python program.

def concordance(filename):  # function that takes a file name as parameter and returns the concordance for that file

   file = open(filename,"r")  #opens file in read mode

   unique={}  #creates and empty list

   for word in file.read().split():  #loops through every word in the file

       if word in unique:  # if words is already present in the list

           unique[word] += 1  #add 1 to the count of the existing word

       else:    #if word is not present in the list

           unique[word] = 1 #add the word to the list and add 1 to the count of word

           file.close();  # close the file

   for x in sorted(unique):  #sort the list and displays words with frequencies

       print(x, unique[x]);  #prints the unique words and their frequencies in alphabetical order

#prompts user to enter the name of the file

file_name=input('Enter the input file name: ')

concordance(file_name)  #calls concordance method by passing file name to it

Explanation:

The program has a function concordance that takes a text file name as parameter and returns a list of unique words and their frequencies.

The program first uses open() method to open the file in read mode. Here "r" represents the mode. Then creates an empty list named unique. Then the for loop iterates through each word in the file. Here the method read() is used to read the contents of file and split() is used to return these contents as a list of strings. The if condition inside the loop body checks each word if it is already present in the list unique. If the word is present then it adds 1 to the count of that word and if the word is not already present then it adds that unique word to the list and assign 1 as a count to that word. close() method then closes the file. The second for loop for x in sorted(unique):  is used to display the list of unique words with their frequencies. sorted() method is used to sort the list and then the loop iterates through each word in the list, through x, which acts like an index variable, and the loop displays each word along with its frequency.

6 0
3 years ago
Suppose you've decided to write a function template that you expect to use in many different source files. Suppose, further, tha
Sladkaya [172]

Answer:

The Solution to the given question can be defined as follows:

Explanation:

Please find the complete question in the attachment file.

In this case, the compiler will try to correct the model type by both the form we used when we try and call the method with both the appropriate form variable. It type of function. Consequently, unless the function in another file is specified, the compiler cannot locate the digital strategy. The point to note here is that only when this code is used, the template code shall be compiled.

The construct component will therefore be efficient so in this case, its connection stage would fail. An undefined connection to the feature <function name> can constitute a possible error in this case. It rules, therefore, address the construction project problem. Furthermore, the template function throughout the main program is generally recommended. It can be solved alternatively because parameters of a template like <function name><type> could be specified throughout the CPP file.

8 0
3 years ago
How to fix 500 internal server error youtube?
DedPeter [7]
Just shut everything down.

Hope this was helpful :) 
5 0
3 years ago
Read 2 more answers
The Clock speed of a computer system is 3 GHz. State what this means
riadik2000 [5.3K]
I don't really know the answer
3 0
3 years ago
Importance<br>computer<br>In the<br>printing industry​
Kruka [31]

Answer:

restate your question

Explanation:

3 0
3 years ago
Other questions:
  • If you are planning to carry a large balance on your credit card, which of the following credit card features should you look fo
    7·2 answers
  • (1) Prompt the user to enter five numbers, being five people's weights. Store the numbers in an array of doubles. Output the arr
    7·1 answer
  • List several things that geographers can map using remotely sensed data
    5·1 answer
  • Which of the following statements is the most accurate, yet simple, definition of a computer?
    13·2 answers
  • Using substitution what is the value for x for the equations 2x+y=-3 and
    14·1 answer
  • Have you searched Buzz Ch.at on playstore​
    13·1 answer
  • palindrome is a string that reads the same forwards as backwards. Using only a xed number of stacks, and a xed number of int and
    15·1 answer
  • Gauthmath https://s.tutorus.xyz/lp/invite?code=GGQGBL​
    13·1 answer
  • An array similar to a phone book has 1000 names arranged as names [0], names[1]....names[999]. Nancy wants to search a name X in
    15·1 answer
  • Help ASAP please This is a skills lab simulation for college, it’s on Microsoft word is there a keyboard shortcut or something o
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!