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

what is the slope of y=6-3x
Samira bought 156 ounces of trail mix. She wants to divide the amount equally into 24 portions. How many ounces of trail mix will be in each portion?
Can someone help me plz
Evaluate the expression for the given value of the variable(s). -x2 - 4x; x = –3
Brianna wants to buy some trees for her yard. A local store charges $25 to plant each tree plus a delivery fee of $50. A lawn service charges $35 to plant each
Define and explain the terms “gerrymandering” and “pork-barrel spending”. Do you believe these systems are fair? Why or why not? Use specifics and examples.
I need help on this please
how were the irregularities of patshalas checked by company
Can someone help me?
What were the characteristics of the men who made up the Anti-Federalists party?