Commit cc86c04d by BellCodeEditor

save project

parent 9ce38526
Showing with 74 additions and 18 deletions
import random
# 私钥
noise="*&^#%##$^&&*^%##$%&*"
text=" "
list(noise)
key = "abcdefgh使用编程实现位移替换加密,制作密码机关真是太好玩了哈哈!"
# 要加密语句
message = "诺依,周末一起去看动漫展吧!"
for i in message:
str1=i
str2=random.choice(key)
str3=random.choice(key)
text=text+str1+str2+str3
text=list(text)
text.insert(5,noise)
text="".join(text)
print(text)
\ No newline at end of file
import turtle
screen=turtle.Screen()
name=screen.textinput("telite","暗号!")
key=("马思维")
if name==key :
pen=turtle.Pen()
pen.fillcolor("light yellow")
pen.speed(3000000000000000)
pen.penup()
pen.goto(100,100)
pen.pendown()
pen.left(90)
pen.begin_fill()
pen.circle(100,180)
pen.forward(50)
pen.circle(100,180)
pen.forward(50)
pen.end_fill()
pen2=turtle.Pen()
pen2.fillcolor("black")
pen2.penup()
pen2.goto(-50,80)
pen2.pendown()
pen2.begin_fill()
pen2.circle(5,360)
pen2.end_fill()
pen2.penup()
pen2.goto(50,80)
pen2.pendown()
pen2.begin_fill()
pen2.circle(5,360)
pen2.end_fill()
pen.fillcolor("black")
pen3=turtle.Pen()
pen3.fillcolor("pink")
pen3.goto(-50,0)
pen2.speed(3000000000000)
pen3.speed(300000000000)
pen3.begin_fill()
pen3.forward(100)
pen3.circle(5,180)
pen3.forward(100)
pen3.circle(5,180)
pen.end_fill()
pen.begin_fill()
pen.circle(100,180)
pen.left(90)
pen.forward(200)
pen.end_fill()
pen.fillcolor("light yellow")
pen.begin_fill()
pen.circle(-10,180)
pen.end_fill()
pen.right(90)
pen.forward(20)
pen.left(90)
pen.forward(200)
pen.begin_fill()
pen.circle(10,180)
pen.end_fill()
pen.hideturtle()
pen2.hideturtle()
pen3.hideturtle()
pen4=turtle.Pen()
pen4.penup()
pen4.goto(-200,-200)
pen4.pencolor("red")
pen4.write("我是马思维!",font=("仿宋",20,"normal"))
turtle.done()
else:
pen5=turtle.Pen()
pen5.write("暗号错误!",font=("仿宋",30,"normal"))
turtle.done()
\ No newline at end of file
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