简单 python程序的编写和运行
1.Hello World
打开IDLE
输入print("Hello World")
回车
2.绘制同心圆
同样打开IDLE输入代码
import turtle
turtle.pensize(2)
turtle.circle(10)
turtle.circle(40)
turtle.circle(80)
turtle.circle(160)
3.绘制五角星
同样点击IDLE写入代码
>>> from turtle import*
>>> color('red','red')
>>> begin_fill()
>>> for i in range(5):
fd(200)
rt(144)
>>> end_fill()
>>>
希望大家喜欢