My first 'Meaningful' program in Python
Python is far more interesting and easier than that expected.After learning basics from 'A byte of Python',I hereby proudly present my First worth saying python program......
#program to convert decimal no to binary
n=int(raw_input("\nEnter the no "))
i=0
flag=1
s=[] #list named s
while flag:
s.append(n%2) #adding remainder to list s
n=n/2 #dividing by 2
i=i+1
flag=n
s=s[::-1] #reversing the list
for c in range (0,i):
print s[int(c)],
#program to convert decimal no to binary
n=int(raw_input("\nEnter the no "))
i=0
flag=1
s=[] #list named s
while flag:
s.append(n%2) #adding remainder to list s
n=n/2 #dividing by 2
i=i+1
flag=n
s=s[::-1] #reversing the list
for c in range (0,i):
print s[int(c)],