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

If you were to perform a cost-benefit analysis of using HAAs in food containers, children's toys, and other plastic products, what information would you need to
Identify the following sentence as declarative, interrogative, imperative, or exclamatory. The lynx is a wildcat that measures up to three feet in length. A. de
Can someone help me plzzz and thank you
Why was hatshepsut concerned abt creating a myth
On January 1, 20X7, Yarrow Corporation had 1,000,000 shares of common stock outstanding. On March 1, the corporation issued 150,000 new shares to raise addition
How did economics influence foreign policy in 1937-1941
Explain the purposes for which of control accounts areprepared in a business organization ​
7(m+-13)=-42 (Solve for m) Please help
pls answer well due soon 1. Define Self Esteem. (please use a complete sentence) 2. Explain the effects that high and low self esteem can have on health. (3 sen
Please help, brainliest for correct answer