Python第一节课

print("hello world")
name=input("What's your name:")
print("{},it is good for you to study Phython!".format(name))
a=input("a:")
b=input("b:")
print(float(a)+float(b))
a=input("a=")
b=input("b=")
c=input("c=")
l=(float(a)+float(b)+float(c))/2
d=float(l)*(float(l)-float(a))*(float(l)-float(b))*(float(l)-float(c))
s=float(d)**0.5
print(float(s))
r=input("r=")
s=3.14*float(r)*float(r)
print(float(s))
import turtle

turtle.shape('turtle')
turtle.speed(5)
turtle.color('red')
turtle.circle(50)
turtle.circle(75)
turtle.circle(100)
import turtle
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)
import turtle
turtle.shape('turtle')
turtle.speed(50)
turtle.color('green')
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)

 

posted @ 2017-09-06 11:20  41钱嘉信  阅读(203)  评论(0编辑  收藏  举报