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

Dominick lives 1 3/4 miles from his school.  If his mother drives him half the way, how far will Dominick have to walk to get to school?
How do scientists use seismic waves to determine the interior structure of Earth?
Alicia estimates that the surface area of a rectangular prism with a length of 11 meters,a width of 5.6 meters,and a height of 7.2 meters is about 334 cubic met
the cafeteria has 45 square  tables that can be pushed together to form one long table for the lacrosse team's banquet. Each square table can seat one person on
An airplane travels 3,260 kilometers in 4 hours. What is the airplane’s average speed?
What is biogeography and what does it provide?
Does every point lie in a quadrant?
If 8 men can chop down 28 trees in one day, how many trees can 20 men chop down in one day?
What are the 3 features of a typical seigneurie
If a slope of a line is 2/0 is it 0 or undefined?