Commit 573747e8 by BellCodeEditor

save project

parent 4ea37e4a
Showing with 31 additions and 17 deletions
""" dict = {"name":"小明","age":"12","name":"小齐"}
使用turtle模块画图 print(dict)
每次移动都增加画笔移动的长度,并旋转91°,重复执行300次,查看效果 \ No newline at end of file
"""
import turtle
pen = turtle.Pen()
# 请创造师在下面接着创作
distance=1
for i in range(300):
pen.forward(distance)
distance+=1
pen.right(121)
# 隐藏画笔,保存画布
pen.hideturtle()
turtle.done()
\ No newline at end of file
import random
key="abcdefg使用python实现简单的位移替换加密,制作机关密码真是太好玩了!"
message="诺伊,周末一起去看动漫展吧"
key_message=""
noise="port:@#$%^&"
for i in message:
str1=i
str2=random.choice(key)
str3=random.choice(key)
text=str1+str2+str3
key_message=key_message+text
list_message=list(key_message)
index=random.randint(0,len(key_message))
list_message.insert(index,noise)
result_message="".join(list_message)
print(result_message)
\ No newline at end of file
body1={"姓名":"杰克","性别":"男","年龄":"13"}
body2={"姓名":"苏珊","性别":"女","年龄":"11"}
body3={"姓名":"小贝","性别":"男","年龄":"12"}
info={"杰克":body1,"苏珊":body2,"小贝":body3}
print(info["小贝"])
\ No newline at end of file
a=int(input("请输入长:"))
b=int(input("请输入宽:"))
print("面积:"+ a*b)
print("周长:"+ (a+b)*2)
\ 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