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

Two trains leave the station at the same time, one heading East and the other heading West. The westbound train is going 60mph. The eastbound train is going 80m
Why were Native Americans who practiced agriculture more likely than hunter-gatherers to establish permanent homes?
5000 is 1/10 of what
What is the value of 5 in 356,039,763
5.4 5.400 less greater
can some help me better to remember the map of Europe ?
What represents instantaneous velocity on a graph?
Death Valley has an elevation if -282 feet relative to sea level. Explain how to use absolute value to describe the elevation of Death Valley as a positive inte
is the decimal form of 13/3 a rational number.
Why were Native Americans who practiced agriculture more likely than hunter-gatherers to establish permanent homes?