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

describe the tone that jordan anderson uses in his letter.which emotions does his writing reveal?
God helps those who helps themselves - Franklin
In a study about the relationship between marital status and job level, 8,235 males at a large manufacturing firm reported their job grade (from 1 to 4, with 4
I need this help ASAP!! I need to change "came up with an approximation" into a strong verb (7th grade)
Contour plowing is a soil conservation method that involves _____.
how long have viruses been around
I need help on this one!!
Which body of water would not need desalination a dead sea b great salt sea c artic ice caps d pacific ocean
The length of a rectangle room is 6 feet longer than twice the width. If the room's perimeter is 132 feet, what are the room's dimensions?
Can someone tell me how to find acceleration with only using distance and time? It would be much appreciated