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

How did geography influence the way the english colonies developed?
Convert 45.6 milliliters to liters.
Help, this is a trick question! Which expression has a value of 74? (75 − 5) × 1 + 4 (75 − 5) × (1 + 4) 75 − 5 × (1 + 4) 75 − (5 × 1 + 4)
If the height of the fence 6.5 what is the length of the fences shadow
What determines the path that an object in projectile motion follows? A) gravity only B) inertia and air resistance C) gravity and inertia D) gravity and air re
In “A Smart Cookie,” Esperanza’s mother quit high school, but in “An Hour with Abuelo,” Arturo’s abuelo finished high school. This is an example of a contrast.
Anybody know? Also, what pattern?
Which of the following is true about energy drinks and mixers: a. carbonation generally slows the rate of alcohol absorption b. a sweet taste can hide the tas
I need help. I'm very confused.
What kinds of error types are indicated by a red circle with an exclamation point (”!”) in the summary grid?