赞
踩
贪心学习院人工智能python编程特训营
实战一项目作业 情报密码
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Aug 4 11:38:43 2019
@author: ikakppkk
"""
"""
加密
"""
code = input("请输入你要的密语:")
print(code)
result=""
for j in code:
result +=str(ord(j))+"|"
print("加密后的密语:"+result)
list_result = result.split("|")
#print(list_result)
list_result.remove("")
print(list_result)
"""
解密
"""
response_result = ""
for i in list_result:
#print(type(i))
k=chr(int(i))
response_result +=k
print("解密后的密语:"+ response_result)
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。