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

What equals to 31 using multiplication?
Express 0.59 as a fraction....
Express 0.59 as a fraction....
What were the origins of Islam and what are its main beliefs ..
depict an angle 7pi over 4 in standard position
3/4 + 1/8= with simplest form.
What were the origins of Islam and what are its main beliefs ..
Express 0.59 as a fraction....
What were the origins of Islam and what are its main beliefs ..
Express 0.59 as a fraction....