Commit 8d3c0fb9 by BellCodeEditor

auto save

parent 4c87931c
import turtle as t
t.penup()
t.goto(0,-200)
t.pendown()
t.circle(200)
t.penup()
t.goto(-100,50)
t.pendown()
t.fillcolor("blue")
t.begin_fill()
t.circle(20)
t.end_fill()
t.penup()
t.goto(100,50)
t.pendown()
t.fillcolor("blue")
t.begin_fill()
t.circle(20)
t.end_fill()
t.penup()
t.goto(0,50)
t.pendown()
t.circle(-50,steps=3)
t.penup()
t.goto(-150,-70)
t.pendown()
t.goto(0,-170)
t.goto(150,-70)
t.done()
\ No newline at end of file
import turtle
turtle.penup()
turtle.goto(-100,100)
turtle.pendown()
turtle.forward(200)
turtle.right(90)
turtle.forward(200)
turtle.right(90)
turtle.forward(200)
turtle.right(90)
turtle.forward(200)
turtle.right(90)
turtle.penup()
turtle.goto(0,0)
turtle.dot(20,"red")
turtle.penup()
turtle.goto(-40,0)
turtle.dot(20,"red")
turtle.goto(40,0)
turtle.dot(20,"red")
turtle.hideturtle()
turtle.done()
\ No newline at end of file
'''
计算长方形的面积
并输出结果
'''
#a代表长方形的长
a = 6
#b代表长方形的宽
b = 3
#s代表长方形的面积
s = a*b
print("长方形的面积为;",s)
\ No newline at end of file
import random
# 私钥
key = "abcdefgh使用编程实现位移替换加密,制作密码机关真是太好玩了哈哈!"
# 要加密语句
message = "诺依,周末一起去看动漫展吧!"
key1 = "ds7ft45936438637673r03"
key_message=""
# 请使用私钥key,对message进行加密
for i in range(len(message)):
a=message[i]
b=random.choice(key)
c=random.choice(key)
d=a+b+c
key_message=key_message+d
key_message = list(key_message)
key_message.insert(8,key1)
key_message = "".join(key_message)
print(key_message)
message1=list(key_message)
message1.insert(random.randint(0,len(message1)),key1)
message2="".join(key_message)
print(message2)
\ No newline at end of file
p = 3.14
r = float(input("请输入圆的半径:"))
zj = 2*r
zc = zj *r
mj = p*r*r
print("圆的直径为:%.2f"%zj)
print("圆的周长为:%.2f"%zc)
print("圆的面积为:%.2f"%mj)
\ 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