凯撒密码、GDP格式化输出、99乘法表

1.

fff =input('明文=')
for i in fff:
print(chr(ord(i)+3),end='')

 

2.

print('国家名称'+' ''GDP总量(人民币亿元)')
print("{0:" "<8}{1:"">12,.2f}".format("中国",765873.4375))
print("{0:" "<8}{1:"">10,.2f}".format("澳大利亚",78312.4375))

3.

for i in range(1,10):
    for o in range(1,i+1):
        print('{0:<1}x{1:<2}={2:<2}'.format(i,o,i*o),end=' ')
print(' ')

 

posted @ 2017-09-19 21:48  blackboardf  阅读(103)  评论(0编辑  收藏  举报