afrade0001 afrade0001
  • 17-12-2020
  • Computers and Technology
contestada

What is output?
C = 1
sum 0
while (c < 10):
c = c + 3
sum
sum + C
print (sum)

Respuesta :

asarwar
asarwar asarwar
  • 17-12-2020

Answer:

The output of this question is 21. As show in the image

The explanation is given in below

Explanation:

Let first write the question

C=1

sum = 0

while(C<10):

C=C+3

sum=sum + C

print(sum)

Now Focus on

while(C<10):

C=C+3

sum=sum + C

The value of C is initially 1

C=1+3

Sum= 0+4

In second loop the value of C will become 4

c=4+3

sum=4+7

In third loop the value of C will be 7

c=7+3

sum=11+10

so the answer is 11+10=21

Ver imagen asarwar
Answer Link

Otras preguntas

Devise a logical argument for which hurricane related hazard poses the largest threat to coastal areas: storm surge, tornadoes, or wind and squalls.
​3 ​ ​4 ​​ =−6e− ​3 ​ ​5 ​​
In "Two Friends," how do the two friends face their fate?
How has the use of television changed the nature of presidential campaigns?
Volcanoes can change the surface of the Earth by A. creating islands B. destroying mountains C. building mountains D. spewing ash and gas
15 divided by 22.8.
Among early peoples, a cause of migration was following herds for hunting. What would be a reason for settlement? A. permanent settlement of herds B. sedentar
Describe how scientists use fossils as evidence of evolution.
Which item does Bud never go anywhere without? A. his mother's lucky marbles B. his father's picture C. his bookbag D. his suitcase
What is the inequality