Commit 93c8e3a7 by BellCodeEditor

auto save

parent 53ca9cec
Showing with 84 additions and 0 deletions
import turtle as t
t.penup()
t.goto(80,-130)
t.pendown()
for i in range(4):
t.left(90)
t.forward(400)
t.setheading(-360)
t.penup()
t.goto(-120,-30)
t.pendown()
t.fillcolor("blue")
t.begin_fill()
t.circle(100,360)
t.end_fill()
t.done()
\ No newline at end of file
import turtle as t
t.penup()
t.goto(-50,-150)
t.pendown()
t.circle(200,360)
t.fillcolor("yellow")
t.begin_fill()
t.circle(200,360)
t.end_fill()
t.penup()
t.goto(30,-20)
t.pendown()
for i in range(4):
t.left(90)
t.forward(150)
t.fillcolor("white")
t.begin_fill()
for i in range(4):
t.left(90)
t.forward(150)
t.end_fill()
t.done()
\ No newline at end of file
#print("周子杰")
#print("zack")
#print("10")
#="hello"*2
#input(s)
####q=19
#w=9
#input(19**9)#次方运算
#a=9909999999999
#d=101010101010
#input(9909999999999*101010101010)#乘法
#a=278
#w=93
#input(278//93)
#p = float(3.1415926)
#r = 6
#area = p*r*r
#print("圆的面积为:%0.2f"%area) #计算圆的面积
#import turtle as t #导入海龟库
#t.screensize(800,600,"pink")#画布大小
#t.setup(600,600,300,200)#窗口位置
#t.done()
#t.circle()
#编写一个程序,它以圆的半径作为输入,输出圆的直径、
#周长和面积(保留两位小数)。 要求: 程序开始运行
#后,输入一个数字作为半径; 程序会根据输入的数字给出
#圆的直径、 周长和面积,并且注明是直径、周长、面积。
p = 3.14
r = float(input("请输入一个大于0的半径:"))
a = 2*r #直径
b = a*r #周长
c = p*r*r #面积
print("圆的直径是%.2f"%a)
print("圆的周长是%.2f"%b)
print("圆的面积是%.2f"%c)
\ 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