Is there a better way to code this specific algorithm using successively division through 2 which converts decimal numbers into binary numbers without calling a build inbuilt-in function?
print "Please enter a decimal number."
prompt = '>> '
dec_number = input(prompt)
dec_new = dec_number
binstr = ''
'''dec2bin'''
while dec_new != 0:
binstr += str(dec_new % 2)
dec_new = dec_new // 2
print binstr[::-1]