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

Light with a wavelength of 550 nm is traveling through a 50 kg block of ice (n=1.3). How fast is the light traveling in m/s?
How can you use multiplication to check your division
How do I do these question? Please answer a and b. not mix them together. Please help!
the value of ¾ of 12 isa) 16. b) 1. c) 9. d) 1/16with step by step explanation ​because I am getting two answers 16 and 9
The last question. I give all my points !!! Traduction: Calculate the perimeter of the polygon where a= 58° b=C A= 24.6 Options A) 100.2 m B) 96.4 m C) 78.9 m
The question with the tag “2” (question 2), I’m I write about the answer or not? Please state your solution with the answer. Thanks.
The Settlement House Movement began in____________ and came to the U.S. in 1886 with the opening of the University Settlement House in New York City. Americans
The question with the tag “2” (question 2), I’m I write about the answer or not? Please state your solution with the answer. Thanks.
Select the correct answer from each drop-down menu. Some of the images in the diagram are images of polygon 1 from similarity transformations. Graph shows 5 pol
1. Find the possible values of r in the inequality 5 > r - 3. OA.r = 8. OB. r<2 OC.r=2 D. r<8