Python for Engineers
Solve Problems by Coding Solutions - A Complete solution for python programming
Blog Pages
Blog
News
Distributions
NumPy Tutorials
Self Learning
IDE
Packages
About
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:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment