1.愷撒密碼的編碼
plaincode = input('明文:')
print('密文:',end='')
for i in plaincode:
print(chr(ord(i)+3),end='')
2.國家名稱 gdp總量(人民幣億元)
中國 ¥765873.4375
澳大利亞 ¥ 78312.4375
(國家名稱左對齊,數字右對齊,千分位,2位小數)
print('國家名稱 gdp總量(人民幣億元)')
print('¥'.format('中國',¥765873.4375))
print('國家名稱 gdp總量(人民幣億元)')
print('¥'.format('澳大利亞',¥78312.4375))
3.打出99乘法表
for i in range(1, 10):
for j in range(1, i+1):
print'%d*%d=%d% '.(i, j, i*j)
posted @
2017-09-19 22:00
林丹宜 閱讀(
...)
編輯收藏
凱撒密碼 GDP格式化輸出 99乘法表
愷撒密碼的編碼 國家名稱 gdp總量 人民幣億元 中國 765873.4375 澳大利亞 78312.4375 國家名稱左對齊,數字右對齊,千分位,2位小數 打出99乘法表 1.答 s input 請輸入密文 print 明文 end for i in s print chr ord i 3 end...
凱撒密碼 GDP格式化輸出 99乘法表
1.凱撒密碼的編碼 a input 明文 print 密文 end for i in a print chr ord i 5 end 2.國家名稱 gdp總量 人民幣億元 中國 765873.4375 澳大利亞 78312.4375 國家名稱左對齊,數字右對齊,千分位,2位小數 print 國家名稱...
凱撒密碼 GDP格式化輸出 99乘法表
愷撒密碼的編碼 plaincode input 明文 for i in plaincode print chr ord i 3 end 國家名稱 gdp總量 人民幣億元 中國 765873.4375 澳大利亞 78312.4375 國家名稱左對齊,數字右對齊,千分位,2位小數 print 國家名稱 ...