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

If a car drove 540 miles in 12 hours, how many miles did it go in 1 hour?
Which of the following does not require energy to be accomplished? a) moving car B) a stationary inanimate object C) growing a plant D) getting a tan
What is the equation of the line through (2,-4) and having slope of 3/5
please please pleaseee help me ?!
volume of triangles prism 8.9 cm 8cm 14cm
PLEASE HELP!!! I NEED IT QUICK PICTURE BELOW
please help asap! A pot of water is heated to 200°F. the table shows typical temperature readings for the pot. the room temperature is 70°F. how long will it t
With what country did the United States go to war in 2003 because of the belief that country had weapons of mass destruction? O.Pakistan O.North Korea O.Israel
On a number line, |4| and -4 are the same point.
Vivian surveyed bicyclists in her community to see the average number of miles they biked per day. Her results are shown below. 7, 10, 13, 4, 12, 21, 10, 3 What