Python输入输出练习,运算练习,turtle初步练习

print("Hello World!!")
name=input("what is your name?\n")
where=input("where are you now?\n")
age=input("how old are you ?\n")
print("your name is {}".format(name))
print("you live in {}".format(where))
print("you are {} years old".format(age))
a=input("请输入第一个数字:")
b=input("请输入第二个数字:")
sum1=float(a)+float(b)
print("两数之和:{}".format(sum1))
a=float(input("第一条边长:"))
b=float(input("第二条边长:"))
c=float(input("第三条边长:"))
p=(a+b+c)/2
s=(p*(p-a)*(p-b)*(p-c))**0.5
print ("三角形的面积为{}".format(s))
r=float(input("圆的半径:"))
s=3.14*r*r
print("圆的面积为{}".format(s))
import turtle
turtle.speed(100)
turtle.circle(10)
turtle.circle(20)
turtle.circle(30)
turtle.circle(40)
import turtle
turtle.begin_fill()
turtle.fillcolor("blue")
turtle.color("blue")
turtle.forward(200)
turtle.right(144)
turtle.forward(200)
turtle.right(144)
turtle.forward(200)
turtle.right(144)
turtle.forward(200)
turtle.right(144)
turtle.forward(200)
turtle.right(144)
turtle.end_fill()

 

posted on 2017-09-06 11:46  27--何卓霖  阅读(267)  评论(0编辑  收藏  举报