Commit 5d376ba2 by BellCodeEditor

save project

parent e161056f
student1 = {'语文': 91, '数学': 88, '英语': 85}
student2 = {'语文': 97, '数学': 98, '英语': 90}
student3 = {'语文': 95, '数学': 100, '英语': 93}
score = {'悟空': student1, '诺依': student2, '小贝': student3}
while True:
print("请输入要查询的名字,退出请输入q")
name = input("姓名:")
print("*" * 30)
if name in score:
info = score[name]
for k,v in info.items():
print(k, v)
print("*" * 30)
elif name == "q":
break
else:
print("查询错误,请重新输入")
print("*"*30)
print("程序结束")
\ No newline at end of file
import turtle
p = turtle.Pen()
p.color("blue")
p.down()
p.circle(100)
p.up()
p.goto(+100,100)
p.down()
p.forward(-200)
p.up()
p.goto(0,+200)
p.down()
p.goto(0,0)
turtle.done()
\ No newline at end of file
t = int(input("请输入一个三位数"))
h = t//100
m = (t-h*100)//10
s = t-h*100-m*10
print("百:",h,",""十:",m,",""个:",s)
\ No newline at end of file
import turtle
pen = turtle.Pen()
x = 0
y = 0
pen.up()
pen.goto(0,-150)
pen.down()
pen.circle(150)
pen.up()
pen.goto(x-60,y+40)
pen.down()
pen.fillcolor("blue")
pen.begin_fill()
pen.circle(15)
pen.end_fill()
pen.up()
pen.goto(x+60,y+40)
pen.down()
pen.fillcolor("blue")
pen.begin_fill()
pen.circle(15)
pen.end_fill()
pen.up()
pen.goto(x-30,y-40)
pen.down()
for i in range(3):
pen.forward(60)
pen.left(120)
pen.up()
pen.goto(x-100,y-90)
pen.down()
pen.right(20)
pen.forward(107)
pen.left(40)
pen.forward(107)
turtle.done()
import turtle
pen = turtle.Pen()
x = 0
y = 0
r = 0
pen.down()
pen.hideturtle()
pen.fillcolor("red")
pen.begin_fill()
pen.circle(r)
pen.end_fill()
pen.up()
pen.goto(x-40,y)
pen.down()
pen.hideturtle()
pen.fillcolor("red")
pen.begin_fill()
pen.circle(r)
pen.end_fill()
pen.up()
pen.goto(x+40,y)
pen.down()
pen.hideturtle()
pen.fillcolor("red")
pen.begin_fill()
pen.circle(r)
pen.end_fill()
pen.up()
pen.goto(-100,100)
pen.down()
for i in range(4) :
pen.forward(200)
pen.right(90)
turtle.done()
import turtle
pen = turtle.Pen()
x = 0
y = 0
pen.speed(1)
pen.hideturtle()
pen.fillcolor("yellow")
pen.begin_fill()
pen.forward(180)
pen.left(90)
pen.forward(180)
pen.goto(x,y)
pen.end_fill()
pen.fillcolor("red")
pen.begin_fill()
pen.forward(180)
pen.left(-90)
pen.forward(180)
pen.end_fill()
turtle.done(
\ No newline at end of file
x = int(input("输入一个数字作为半径"))
y = x*2
z = x*3.14
s = x**2*3.14
print("直径:",y,",""周长:",z,",""面积:",s)
\ 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