23jrojas 23jrojas
  • 26-02-2021
  • Computers and Technology
contestada

What is output? c = 1 sum = 0 while (c < 10): c = c + 3 sum = sum + c print (sum)

Respuesta :

tonb
tonb tonb
  • 26-02-2021

Answer:

21

Explanation:

The values of c that make it into the loop are 1, 4, 7.

The values that are added to sum are 3 higher, i.e., 4,7 and 10.

The sum of those is 21.

p.s. why did you not run the program yourself?

Answer Link

Otras preguntas

A total interruption of processing throughout a distributed information technology system can be minimized through the use of:
John f. kennedy's greatest disaster as president was
first answer is BRAINLYED Which American author, known as the "Sage of Concord," wrote an essay called "Self
Which of the following tests can best help you classify a rock as sedimentary, metamorphic, or igneous? A) Pour acid on it and see if it bubbles. B) Examine i
If g(x)=1/2x+8 and h(x)=1/2x-2, what is the value of g(h(-8))? 1) 0 2) 9 3) 5 4) 4
A student wrote the following sentence: Pearl is described as an "elf-child," a "sprite," and "the "embodiment of the warfare of Hester's spirit." All of these
The worldwide use of cleaner energy sources could lead to which of the following results? rise in ocean levels reduction in acid rain increased desertification
Write the ratio as a fraction in simplest form. 63 : 28
What is the value of x for the triangle below? Step by step please
Asexual reproduction produces _____.