凯撒密码、GDP格式化输出、99乘法表
1.
s
=
input
(
'明文:'
)
print
(
'密文:'
,end
=
'')
for
i
in s
:
print
(
chr
(
ord
(i)
+
3
),end
=
'')
2.
print('国家名称 GDP总量(人民币亿元)')
print('{0:<5}{1:>12,.4f}'.format('中国 ¥',765873.4375))
print('{0:<5}{1:>12,.4f}'.format('澳大利亚 ¥',78312.4375))
3.
for x in range(1,10):
for y in range(1,x+1):
print('{0}*{1}={2:<5}'.format(y,x,x*y),end='')
print(' ')