0
What is the error in this program?
Can somebody help? https://code.sololearn.com/cCfSsIJfDd1p/?ref=app
3 Answers
+ 2
This should be doing the trick
digit=i%2
+ 1
Hi.
Since your output is very scientific in terms of number representation try
while(i>0):
digit=i%10
i=i//2 # changed here
s+=str(digit)
s=s[::-1]
Hope this helps. Cheers. C.
0
I changed it. But the output is not right