Commit 18dbf9d3 by BellCodeEditor

save project

parent 03e22c89
Showing with 27 additions and 17 deletions
student1 = {'语文': 91, '数学': 88, '英语': 85} import turtle
student2 = {'语文': 97, '数学': 98, '英语': 90} #背景颜色
student3 = {'语文': 95, '数学': 100, '英语': 93} screen=turtle.Screen()
score = {'悟空': student1, '诺依': student2, '小贝': student3} screen.bgcolor("light blue")
while True: #写字
name=input("请输入姓名") pen=turtle.Pen()
print("*"*30) pen.penup()
if name in score: pen.goto(100,-100)
info=score[name] pen.write("Hi,诺依~\n用python写电子贺卡真是太有趣啦~\n我也喜欢python~\n——悟空 ",font=("Times",20,"normal"))
for k,v in info.items(): pen.hideturtle()
print(k,v) #画爱心
print("*"*30) pen1=turtle.Pen()
elif name=="q": pen1.pencolor("red")
break pen1.pensize(5)
else: pen1.left(45)
print("输入错误") pen1.forward(100)
\ No newline at end of file pen1.circle(50,180)
pen1.right(90)
pen1.circle(50, 180)
pen1.forward(100)
pen1.hideturtle()
turtle.done()
\ No newline at end of file
import math
pi = math.pi
print(round(pi,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