《Python数据结构与算法分析》(第二版)
# !/user/bin/env python
# coding:utf-8
from pyStack import Stack
'''十进制转二进制
def dividedBy2(decNumber):
remainStack = Stack()
while decNumber > 0:
remain = decNumber % 2
remainStack.push(remain)
decNumber = decNumber // 2
#构建二进制字符串
binString = ''
while not remainStack.isEmpty():
binString = binString + str(remainStack.pop())
return binString
print(dividedBy2(int(input('please enter a decimal number: '))))
'''
#十进制转任意进制