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

when did the Aztec civilization end?
What does a production possibilities frontier show? a. scarce and less scarce resources b. global trade-offs and costs of doing business c. an economy that is p
true or false- Modern Russia still applies the same communist system that was used by the Soviet Union through the Cold War.
What was the punishment for the Rosenbergs, who were convicted of providing bomb secrets to the Russians?
why did penn purchase Delaware?
what are four human and phsical features in Kenya
Which statement best describes the role of decomposers? A) They convert carbon dioxide and water to glucose. B) They break down organic compounds into products
Find the distance, to the nearest tenth, from T(4,-2) to U(-2,3).
This is not the same one as before. Which in inequality matches the graph ?
Enzymes only work with specific substrates because each substrate?