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

During the Abbasid dynasty, small, independent states challenged Muslim rule, and some even broke away from the caliphate. True False
How does knowing the story of Pandora enrich the viewer's experience and understanding of this painting? Knowing the backstory allows the viewer to relax
????????????????????
In the combined gas law, if the pressure in the system is increased, what happens to the volume if temperature remains constant?
The literary period from 1800 to 1860 reflect spirit by?
Find the general solution of the given system. dx dt = x + y ? z dy dt = 2y dy dt = y ? z
Panchatantra was an influence on Aesop. Kublai Khan. Buddha. Julius Caesar.
A scientist makes an educated guess that diabetes is caused by genetic factors. His guess is an example of
How do psuedopods work
A data set contains three points, and two of the residuals are -6 and 12. What is the third residual