goldy501 goldy501
  • 01-02-2021
  • Computers and Technology
contestada

What is the value of numC at the end of this loop?

numC = 12

while numC > 3:

numC = numC / 2


numC =

Respuesta :

fichoh
fichoh fichoh
  • 02-02-2021

Answer: 3

Explanation:

What is the value of numC at the end of this loop?

numC = 12

while numC > 3:

numC = numC / 2

numC =

The initial numC value = 12

Condition : while numC is greater than 3 ; 12 > 3 (condition met)

The expression numC / 2 is evaluated

numC / 2 = 12 / 2 = 6

numC then becomes 6 ;

Condition : while numC is greater than 3 ; 6 > 3 (condition met)

numC / 2 = 6 /2 = 3

numC = 3

Condition : while numC is greater than 3 ; 3 > 3 (condition not met)

Loop terminates

numC = 3

Answer Link

Otras preguntas

Why is viscosity an important property of matter?
From the story "Story of an Hour". No need to answer the quote part.
PLEASE HELP ASAP!!!!! ∆XYZ has vertices X(0, 3), Y(2, 0), and Z(4, 2). If you reflect ∆XYZ across the line x = 4, what will be the coordinates of the vertices o
Which equation is related to..???
Summarize what themes in biology show Help please!!!
A proportional relationship is shown in the table below:
Abbreviations. Regardless of whether you are an administrative or clinical health worker, you will be reading patient documentation with abbreviations, which ca
PART A: Which statement best summarizes a central idea of the speech? A. America was in a “Space Race” with the Soviet Union during the Cold War, which prompte
What was the importance of the siege of Leningrad?​
2. PART B: Which TWO paragraphs from the folktale support the answer to Part A?