What does return for the
following function definition?
def h(x):
(m, a) = (1,0)
while m<=x:
(m,a) = (m*2,a+1)
return
(a)
Answers
Answered by
0
Answer:
ya
Explanation:
Answered by
0
It return the value of n, if the is greator than the x.
Explanation:
- The above code is in python language which returns the value of n if the value of is greater than the x value which is passed by the user.
- For example, if the user input is 8 then the output is 4 because will gives 16 which is greater than the 8 but will give the value 8 which is equal to the value of x variable which is also 8.
- The above code will continue the steps until the value of is less or equal to the value which is input by the user. If the is not less than the value of x, then it returns the value of n.
Learn More:
- Python program : https://brainly.in/question/5558161
Similar questions