⑴ 关于python的画图的东西。
画正方形
importturtle
importtime
#定义绘制时画笔的颜色
turtle.color("purple")
#定义绘制时画笔的线条的宽度
turtle.size(5)
#定义绘图的速度
turtle.speed(10)
#以0,0为起点进行绘制
turtle.goto(0,0)
#绘出正方形的四条边
foriinrange(4):
turtle.forward(100)
turtle.right(90)
#画笔移动到点(-150,-120)时不绘图
turtle.up()
turtle.goto(-150,-120)
#再次定义画笔颜色
turtle.color("red")
#在(-150,-120)点上打印"Done"
turtle.write("Done")
time.sleep(3)
⑵ 编程怎么做四个正方形
摘要
用python 画四个方形
⑶ 如何用python在正方形中画圆
来画出一个正方形,然后通过旋转3°后,继续画一样的正方形,在通过120次循环后就实现了完整的圆,这里当然也可以用其他的角度和次数,只要能完成360度就可以了。
⑷ python绘制正方形代码
import turtle
for i in range(4)
turtle.forward(100)
turtle.right(90)
turtle.done()
这样就可以了,希望对你有帮助。
⑸ Python3.x 如何用idle画正方形的内切圆
用turtle库,初始位置设置在正方形中心,在以半径为二分之一变成画圆
⑹ python画正方形的函数
使用turtle实现正方形的绘制,定义形参n为正方形的边长。具体代码如下,望采纳。

python绘制正方形
⑺ 编写 python ,绘制以原点为中心,边平行于坐标轴的正方形,求问怎么做
public void sort(int []array, int len){
int i,j,temp;
for (i=1;i<len;i++){
temp = array[i];
j=i-1;
while(j>=0 && array[j]>temp){
array[j+1] = array[j];
j--;
}
array[j+1] = temp;
}
⑻ 有大神可以用python的turtle模块画图吗,求解
from turtle import*
pensize(4)
penup()
fd(150)
right(90)
fd(200)
pendown()
seth(100)
fd(150)
seth(31)
circle(130,300)
seth(170)
fd(80)#shou
seth(85)
fd(30)#qiang
left(90)#qiang
fd(120)#qiang
left(90)#qiang
fd(40)#qiang
left(90)#qiang
fd(80)#qiang
right(90)
fd(45)
left(90)
fd(40)
left(90)
fd(21)
penup()
fd(30)
pendown()
seth(100)
circle(20,290)
seth(340)
fd(90)
seth(270)
fd(100)
penup()
seth(90)
fd(250)
pendown()
pensize(20)
seth(270)
fd(7)
penup()
seth(0)
fd(100)
pendown()
seth(90)
fd(7)
penup()
⑼ 如何用python画一个指定大小的正方形
from turtle import *color('red', 'yellow')begin_fill()while True: forward(200) left(170) if abs(pos()) < 1: breakend_fill()done()
⑽ python无边正方形绘制代码
你好,答案如下所示。

运行结果如图所示
希望你能够详细查看。
如果你有不会的,你可以提问
我有时间就会帮你解答。
希望你好好学习。
每一天都过得充实。