What is the value of f(4000) for the function below?def f(x): d=0 while x >= 1: (x,d) = (x/5,d+1) return(d)
Answers
Answered by
0
Answer: 6
Please mark it as the brainliest answer
Answered by
1
The above code will display 6 for the x value of 4000 when it pass on the function f.
Explanation:
- The above code is in python language which will return the value 6 when the user passes the value 4000 on the above function.
- It is because there is 5 quotient value which is greater than 1 when the number x is continuously divided by 5 and the last quotient value is also counted when it becomes less than 1.
- The quotient value are "800.0, 160.0, 32.0, 6.4, 1.28, 0.256" which are 6 numbers, so the output is 6.
Learn More:
- Python :brainly.in/question/14689905
Similar questions