Commit d3560129 by BellCodeEditor

auto save

parent f94a642f
Showing with 74 additions and 1 deletions
import turtle import turtle
# pen=turtle.Pen()
# pen.write("jyu\nyy",font=("MS Gothsic",50,"normal")) # pen.write("jyu\nyy",font=("MS Gothsic",50,"normal"))
p=turtle.Pen() p=turtle.Pen()
p.shape("turtle")
p.color("red") p.color("red")
p.left(45) p.left(45)
p.forward(100) p.forward(100)
...@@ -9,4 +9,55 @@ p.circle(50,180) ...@@ -9,4 +9,55 @@ p.circle(50,180)
p.right(90) p.right(90)
p.circle(50,180) p.circle(50,180)
p.forward(100) p.forward(100)
p.penup()
p.goto(100,100)
p.pendown()
p.right(45)
p.forward(200)
p.right(90)
p.forward(200)
p.right(90)
p.forward(200)
p.right(90)
p.forward(200)
p.right(90)
p.home()
p.goto(-100,100)
p.home()
p.left(90)
p.forward(140)
p.home()
p.right(45)
p.forward(100)
p.right(180)
p.circle(50,-180)
p.left(90)
p.circle(50,-180)
p.home()
p.right(90)
p.forward(140)
p.home()
p.goto(-100,-100)
p.home()
p.goto(100,-100)
p.home()
p.left(315)
p.forward(100)
p.circle(50,180)
p.right(90)
p.circle(50,180)
p.home()
p.forward(140)
p.home()
p.right(135)
p.forward(100)
p.right(180)
p.circle(50,-180)
p.left(90)
p.circle(50,-180)
p.right(180)
p.forward(100)
p.right(135)
p.forward(140)
p.home()
turtle.done() turtle.done()
print("h\'h\'h")
\ No newline at end of file
def zhuochang(r):
b=3.14*r*2
c=r*r*3.14
return b,c
a=int(input("请输入圆的半径:"))
x=zhuochang(r)
print("圆的半径为",r,"时,周长是%.1f,面积是%.1f" % x)
\ No newline at end of file
a=int(input("请输入第一条边"))
a=int(input("请输入第一条边"))
b=int(input("请输入第二条边"))
c=int(input("请输入第三条边"))
z=int((a+b+c)*0.5)
if a+b>c and a+c>b and c+b>a:
x=a+b+c
print("三角形的周长是",x,"三角形的面积是",s)
else:
print("这三条边不能组成三角形!")
\ 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