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

Sum of 3 numbers is 133. Third number is 3 times the first. Second number is 8 more than the first. What are the numbers?
In snapdragons, there is one allele that produces red flowers and another allele that produces white flowers. Neither allele is dominant and heterozygous indivi
can you express 9/9 as a mixed number why or why not
solve the equation 4+0.3x=19
6. Which choice shows the proper way to use a colon? Warnings are written: on the following labels medicines, cleaning products, and some foods. Warning: If tak
simplify the square root of 9 ÷ by the square root of 25
how are simple cations and anions named ?
The Layout button is located in the ____ group on the HOME tab. Choose one answer. a. Slides b. Drawing c. Paragraph d. Font
Can you solve this equation 13m-22=9m-6
what is 12.09 and 9.88 rounded to the nearest hundreth