answer.
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
Vladimir79 [104]
2 years ago
9

When ____ occur during preliminary debugging, dummy print statements—statements that are temporarily inserted into the code to d

isplay status information on the screen—can be used to help locate the error.
Computers and Technology
1 answer:
ANEK [815]2 years ago
4 0

Answer:

Logic error.

Explanation:

When a logic error occurs sometimes it becomes difficult to locate the error in the code.So to locate the error dummy print used to see which loop,if,else,switch case etc. is executing or not.

for example:-

for(int i=0;i<45;i++)

{

if(i!=1)

{

   continue;

}

cout<<i<<endl;

}

we wanted the loop to print all value of i except 1 but it is printing only 1.We can use dummy print statement for this code in if condition.for(int i=0;i<45;i++)

{cout<<"Loop"<<endl;

if(i!=1)

{

cout<<"Printing"<<endl;

   continue;

}

cout<<i<<endl;

}

We see that the loop is printed 45 times and printing 44 times.We found that the condition in if statement is wrong.It hould be '==' instead of '!='.

You might be interested in
In a single file, you wrote a bike class and used this line of code in the program.
Elza [17]

Answer:

Explanation:

Based on the available options the one that would be correct would be that the code to define your class (beginning with "class bike") must come before the line "bikeA = bike('Acme' 111)." This is because the line of code declaring the object and initializing it needs to be able to grab the information of the class that it is creating an object of. To do this, the class would need to have already been compiled by the program. It is good practice to have each class definitions as its own separate files but this is not a necessity.

5 0
2 years ago
What is the Gain (dB) of a transmission if the Maximum Data Rate is 1 Gbps and the Bandwidth =7000 MHz? Group of answer choices
denpristay [2]

Answer:

15.420 dB

Explanation:

the Gain (dB) of a transmission if the Maximum Data Rate is 1 Gbps and the Bandwidth =7000 MHz is 15.420 dB.

3 0
2 years ago
Write a program whose input is a string which contains a character and a phrase, and whose output indicates the number of times
otez555 [7]

Answer:

The program written in python is as follows

def countchr(phrase, char):

     count = 0

     for i in range(len(phrase)):

           if phrase[i] == char:

                 count = count + 1

     return count

phrase = input("Enter a Phrase: ")

char = input("Enter a character: ")

print("Occurence: ",countchr(phrase,char))

Explanation:

To answer this question, I made use of function

This line defines function countchr

def countchr(phrase, char):

This line initializes count to 0

     count = 0

This line iterates through each character of input phrase

     for i in range(len(phrase)):

This line checks if current character equals input character

           if phrase[i] == char:

The count variable is incremented, if the above condition is true

                 count = count + 1

The total number of occurrence is returned using this line

     return count

The main method starts here; This line prompts user for phrase

phrase = input("Enter a Phrase: ")

This line prompts user for a character

char = input("Enter a character: ")

This line prints the number of occurrence of the input charcater in the input phrase

print("Occurence: ",countchr(phrase,char))

4 0
2 years ago
Which of the following describes an executive information system (EIS)?
rjkz [21]
I think the answer is b

hope this helps :)
3 0
2 years ago
Find a 95% confidence interval for the mean failure pressure for this type of roof panel.The article "Wind-Uplift Capacity of Re
aliya0001 [1]

Answer:

The 95% confidence interval would be given by (2.351;3.525)    

Explanation:

1) Previous concepts

A confidence interval is "a range of values that’s likely to include a population value with a certain degree of confidence. It is often expressed a % whereby a population means lies between an upper and lower interval".

The margin of error is the range of values below and above the sample statistic in a confidence interval.

Normal distribution, is a "probability distribution that is symmetric about the mean, showing that data near the mean are more frequent in occurrence than data far from the mean".

\bar X represent the sample mean  

\mu population mean (variable of interest)

s represent the sample standard deviation

n represent the sample size  

2) Confidence interval

The confidence interval for the mean is given by the following formula:

\bar X \pm t_{\alpha/2}\frac{s}{\sqrt{n}}   (1)

In order to calculate the mean and the sample deviation we can use the following formulas:  

\bar X= \sum_{i=1}^n \frac{x_i}{n} (2)  

s=\sqrt{\frac{\sum_{i=1}^n (x_i-\bar X)}{n-1}} (3)  

The mean calculated for this case is \bar X=2.938

The sample deviation calculated s=0.472

In order to calculate the critical value t_{\alpha/2} we need to find first the degrees of freedom, given by:

df=n-1=5-1=4

Since the Confidence is 0.95 or 95%, the value of \alpha=0.05 and \alpha/2 =0.025, and we can use excel, a calculator or a table to find the critical value. The excel command would be: "=-T.INV(0.025,4)".And we see that t_{\alpha/2}=2.78

Now we have everything in order to replace into formula (1):

2.938-2.78\frac{0.472}{\sqrt{5}}=2.351    

2.938+2.78\frac{0.472}{\sqrt{5}}=3.525    

So on this case the 95% confidence interval would be given by (2.351;3.525)    

5 0
2 years ago
Other questions:
  • One reason for using social media is to develop social and professional contacts. True or false?
    9·2 answers
  • Which technology had the same effect in the 1920s as the internet did in the 2000s? the widespread effect of technology 1920s 20
    8·1 answer
  • In __________ mode, the data within an ip packet is encrypted, but the header information is not.
    15·1 answer
  • The OSHA Workplace Poster 3165 is optional for workplaces.<br> A) True<br> B) False
    13·2 answers
  • Which sector provides scope for multimedia designers?
    10·1 answer
  • The ratio of Chris an iood Dom's ages is
    10·1 answer
  • Prove that f(n) = 20n3 + 10nlogn + 5 is O(n3)
    12·1 answer
  • FTP requires confirmation that a file was successfully transmitted to a client, but it has no built-in mechanism to track this i
    5·1 answer
  • If productCost and productPrice are numeric variables, and productName is a string variable, which of the following statements a
    11·1 answer
  • What will the output of this program be when it is executed? def test_function( length, width, height): print ("the area of the
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!