print(‘Hello World!‘)
name=input(‘输入姓名‘) print(‘%s同学,你好‘%name)
print(‘和=‘,int(input(‘数字a=‘))+int(input(‘数字b=‘)))
三角新面积a=input(‘三角形的边a=‘) b=input(‘三角形的边b=‘) c=input(‘三角形的边c=‘) p=(float(a)+float(b)+float(c))/2 s=(float(p)*(float(p)-float(a))*(float(p)-float(b))*(float(p)-float(c)))**0.5
print(‘面积=‘,float(s))
a=input(‘半径=‘) s=3.14*(float(a)**2) print(‘面积=‘,s)
同切圆import turtle turtle.circle(10) turtle.circle(50)
五角星import turtle turtle.forward(100) turtle.right(144) turtle.forward(100) turtle.right(144) turtle.forward(100) turtle.right(144) turtle.forward(100) turtle.right(144) turtle.forward(100)
黄色五角心import turtle turtle.color("yellow") turtle.bgcolor("red") turtle.fillcolor("yellow") turtle.speed(1) turtle.begin_fill() for i in range(5): turtle.forward(200) turtle.right(144) turtle.end_fill()
时间: 2024-11-16 09:28:07