使用Python绘制多边形

  turtle是Python内置的图形库,在这里,咱们须要知道正多边形内角计算公式: 内角=(边数-2)*180/边数 可选项:提示输入一种颜色,进行填充。 本程序运行环境是Python3的IDLE。 import turtle ##python中的图形库 num = int(input("Please input the num of the polygon: ")) color = inp
相关文章
相关标签/搜索