Answer to Question #290527 in Python for raj

Question #290527

What is the value of f(3456) for the function below?


def f(x):


d=0


while x >= 1:


(x,d) = (x/7,d+1)


return(d)

1
Expert's answer
2022-01-25T07:50:17-0500
def f(x):
    d = 0
    while x >= 1:
        (x, d) = (x / 7, d + 1)
    return d


print(f(3456))  # 5

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