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

How did the supreme court rule in the case involving Ida Phillips
Seven times the product of two numbers,a and b,may be written as ?
Find two fractions with a product between 10 and 11
What is the greatest common factor of 52, 65, 78, and 26?
What are the 5 primary functions of the skeletal system?
How do you know if something is alive describe some of the characteristics of living things
Mr. tulley often gives his high school social studies students the opportunity to choose the topics of their projects. he designs critical thinking and student-
Anyone know the answer A.38in. B.32in. C.24in. D.9.5in
A graphic artist is using his computer program to enlarge a picture by a scale factor of 3.5.If the original picture is square with a side length of 2.8 centime
Suppose a cell doubles every hour write an exponetial expression for the number of cells created in 24 hours