Advertisement
ayshan

#3

Apr 3rd, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.15 KB | None | 0 0
  1. a=int(input())
  2. k=0
  3. cem=0
  4. while a>0:
  5. digit=a%10
  6. a=a//10
  7.  
  8. cem=cem+digit
  9. k+=1
  10. print("say",k)
  11. print("cem",cem)
  12. print(format(cem,"b"))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement