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

Carlos, a machinery mechanic, earns $28 per hour. This week, he worked 40 hours of regular pay and 12 hours of overtime, paid at time and a half. How much did h
Please help asap! It's due tomorrow and I want to ace this!
How does online medical direction between physician and EMT come?
how many feet should the driver begin to slow down the vehicle prior to arriving at the reported fire location?
Let C be the set of complex numbers. Prove that the mapping f:C→R given by f(z)=|z|,zϵC is neither one-one nor onto.
Common boom failure - sideloading. What is it and what can cause it?
Which of the following is a radical equation? a. x√3 = 13 b. x³ = 13 c. ∛(y⁹) d. ∛(y²⁷) e. ∛(y²⁴)
Which of the following activities addresses the sentences and structure component for older toddlers? A) Playing with building blocks B) Engaging in finger pai
Select the correctly punctuated sentence. A. I was at the conference, but, I did not run into her. B. I was at the conference, but, I did not see her. C. Sarah,
A wooden block of volume 1000 cm³ is suspended from a spring balance. It weighs 12 N in air. It is suspended in water such that half of the block is below the s