标签:forward turtle import 输入输出 sum tle int speed for
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()
标签:forward turtle import 输入输出 sum tle int speed for
原文地址:http://www.cnblogs.com/hzl123/p/7483941.html