求用python实现页式地址转换,题目如下:凑一凑字数求解答
add=int(input('输入逻辑地址:')) table={0:2,1:1,2:6,3:3,4:7} a,b=divmod(add,2**12) if a not in table.keys(): print('如果为页式存储管理系统则发生缺页,如果是请求页式则发生调页') else: print('物理地址是{}!'.format(table[a]+b))