Answer to Question #79866 in Python for yash

Question #79866
What does g(31415927) return, for the following function definition?
def g(x):
(q,d) = (1,0)
while q <= x:
(q,d) = (q*10,d+1)
return(d)
1
Expert's answer
2018-08-17T04:43:10-0400
function g(31415927) will return 8

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS