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

Find the other endpoint of a line segment with the given midpoint and one endpoint. midpoint (11/2,17/2) and the endpoint is (2,9)
Which pair of angle measures satisfy the condition sin J = cos K?
If abx - 5 = 0, what is x in terms of a and b?
a group of companies bound together to fix prices is called...?
simplify the expression. 3 square root 5/64
If abx - 5 = 0, what is x in terms of a and b?
How do you write 7.8 x 10squared in standard form
what is the result when 4x^2-17x+36 is subtracted from 2 x^2-5x+25?
what is a compound subject
How many triangles are formed by the diagonals from one vertex of a regular octagon?