i want to know the answer of this program: if x is 3456 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

i want to know the answer of this program: if x is 3456

def f(x): d=0 while x >= 1: (x,d) = (x/7,d+1) return(d)

24th Jan 2022, 6:52 PM
pooja balamurugan
pooja balamurugan - avatar
3 Answers
+ 1
"""You can run program and see output in playground.. And add calling statement and print returned result to use that function.. as result = f(3456) print(result) or just print(f(3456)) as last statements edit: 5 as answer I got. how? run this script, see output """ def f(x): d=0 while x >= 1: (x,d) = (x/7,d+1) print(x,",",d) return(d) print(f(3456))
24th Jan 2022, 6:56 PM
Jayakrishna 🇮🇳
+ 2
Thank you so much
24th Jan 2022, 7:03 PM
pooja balamurugan
pooja balamurugan - avatar
+ 1
You're welcome..
24th Jan 2022, 7:08 PM
Jayakrishna 🇮🇳