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

what is the slope of the line 12x+4y=24?
3x+9 -------- how do I solve this? 4x+12
The larger leg of a right triangle is 3cm longer than its smaller leg. The hypotenuse is 6cm longer than the smaller leg. how many centimeters long is the small
what is a false analogy fallacy?
if one parent is homozygous for black hair and the other parent to homozygous for blonde hair, what are the chances that their children will have blonde hair? w
a new motor home costs $89000. It is expected to depreciate 9% each year.Find the value of the motor home in 4 years.
Mosaics are constructed from small pieces of stone called what?
what are couplet poems?
what are the north germanic languages?
Please someone help me out in the next 30mins with this problem!