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

What is the population of portmagee ireland 2016?
Which leader called on african americans to accept a lower political social status as long as they were given an opportunity to participate in industrial growth
a static stretch is ?
Many longitudinal studies have shown that ______ anger during adolescence is normal, but that most adolescents express their anger in ______ ways.
Wallace owns a company that faces risks of volatile price changes, technological changes, and government intervention. What type of risks are these? for plato
A boat travels 21 miles due north and then 28 miles due east. Then the boat travels in a straight line back to its starting point. What was the straight line di
A triangle had two sides that measure to 12 meters and 3 meters. Which could be the measure of the third side ? A) 17m B) 15m C) 10m D) 9m
After reading the brochure, you could conclude that the history of Ghost Ranch is heavily influenced by
The Presidency and the President's Cabinet are defined in ________ of the Constitution.
(mc)which sentence describes an effect of the haymarket riot? the riot was a setback for political machines. the riot furthered the cause of women's suffrage. t