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

Which type of force pulls objects toward one another
How many halves are there in 23
Help please, What does "Happy-Go-Lucky" Mean?
Find an equation of the line that (a) has the same y-intercept as the line and (b) is parallel to the line .
Differentiate. y=ln (17-x)
What Does "Born Secret" Mean?
What Does "Born Secret" Mean?
What are decomposers classified as in an ecosystem?
What is the range of the relation? {(1, 2), (2, 4), (3, 2), (4, 6)}  A.{2, 4}  B.{1, 2, 3, 4, 6}  C.{2, 4, 6}  D.{1, 2, 3, 4}Which relation is a function?  A.{(
Who can vote for or make laws in China?