kawaiikittiesandpupp
kawaiikittiesandpupp kawaiikittiesandpupp
  • 12-05-2022
  • Computers and Technology
contestada

The following code has which kind of error?

total = 0

x = 0

while x < 10:

total = total + x

x = x + 1


A. syntax

B. runtime

C. logic

D. fatal

(it would also be helpful to me to say where the error is but you don't have to)​

Respuesta :

kirabowen15
kirabowen15 kirabowen15
  • 12-05-2022

Answer:

There would be a logic error.

Explanation:

The count for x should have been initialized before addint it to the variable total.

Answer Link

Otras preguntas

Where does cell differentiation happen?
What is the most hardworking organ in the body?
A 20 ton rail car and a 80 ton rail car, initially at rest, are connected together with a giant but massless compressed spring between them. When released, the
Why is education a powerful tool to improve the community?
Which of the "5 Cs of Credit" does the following question best address: Does the borrower have a history of paying back loans A. Capital B. Character C. Capacit
Solve the system x+2y=-11 3y=x+1
Who has the power to begin the process of raising taxes in the United States?
kat is producing a video for her family in amarillo. she is living in new york city, working as an intern with a video production company. she'll be seated in f
Create a multimedia speech and presentation on one of the topics discussed. Your speech should be no more than two minutes long. Collect visual aids to clarify
help simplifylook at the picture ​