Commit 79e4f6d8 by BellCodeEditor

auto save

parent 18891748
Showing with 55 additions and 0 deletions
# text="hello world!"
# for i in text:
# print(i)
# str1="bellcode"
# print(str1[4:])
# text=['p','y','t','h','o','n']
# print("/".join(text))
# str1='本节课我们学习文字加密'
# str2='用python进行'
# list1=list(str1)
# list1.insert(7,str2)
# print("".join(list1))
# print("".join(list(str1).insert(7,str2)))
a=0
b=0
c=0
import random
for i in range(3000):
x=random.randint(8,10)
if x==8:
a+=1
elif x==9:
b+=1
else:
c+=1
print(a,b,c)
\ No newline at end of file
import random
# 私钥
key = "abcdefgh使用编程实现位移替换加密,制作密码机关真是太好玩了哈哈!"
# 要加密语句
message = input("请输入密文:")
list1=list(message)
num=random.randint(0,len(list1))
list1.insert(num,"port@#$%^&")
# str5="".join(list1)
# print(str5)
print("".join(list1))
# 请使用私钥key,对message进行加密
# for i in message:
# s1=i
# s2=random.choice(key)
# s3=random.choice(key)
# text=s1+s2+s3
# print(text)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment