Decimal Number to Binary number conversion

n=int(raw_input('Enter the Number'))
h=" "
while n>0:
  n1=n%2
  print 'R',n1
  n=n/2
  print 'V=',n
  h=h+str(n1)
print 'Binary Number is:',h[::-1]
 

No comments: