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

Type the correct answer in the box. Spell all words correctly. Which is a network of devices built around a person, typically within 10 meters of range? А is a
NO LINKS!! Please help me with this problem​
Choose the word that can not complete the sentence. está _____ .
Which of the following is an benefit of coal? * ecosystem destroyed cheap and abundant clean burning greenhouse gas emissions
What else is produced during the replacement reaction of magnesium and hydrochloric acid? mg 2hcl h2 ________ mgcl2 mg2cl2 mg2cl mgcl
Need help with this please.
Rebekah finds that a solution of sugar in water has a volume of 1.32 fl. oz. how should she report this amount using the metric system? (1 fl. oz. = 29.6 ml) 0.
What form of infrastructure made it easier to transport trade goods among roman cities? aqueducts canals reservoirs roads
Read the scenario below and answer the question that follows. dave is 38 years old and realizes that he hasn’t accomplished many things he has wanted to do in h
(16x2y5 ÷ 4xy2 + 28xy) • 2y2 =