import turtle
turtle.setup(600,400,0,0) turtle.bgcolor('red')
turtle.pencolor('yellow')
turtle.fillcolor('yellow')
turtle.begin_fill() turtle.penup()
turtle.goto(-250,75)
turtle.pendown()
for i in range(5):
turtle.forward(100)
turtle.right(144)
turtle.end_fill()
turtle.done()

for循环:用turtle画一颗五角星2的更多相关文章

  1. for循环:用turtle画一颗五角星

    import turtle # 设置初始位置 turtle.penup() turtle.left(90) turtle.fd(200) turtle.pendown() turtle.right(9 ...

  2. 【Python】【demo实验29】【练习实例】【使用turtle画五角星】

    原题: 使用turtle画五角星: 我的代码: #!/usr/bin/python # encoding=utf-8 # -*- coding: UTF-8 -*- from turtle impor ...

  3. python运用turtle 画出汉诺塔搬运过程

    python运用turtle 画出汉诺塔搬运过程 1.打开 IDLE 点击File-New File 新建立一个py文件 2.向py文件中输入如下代码 import turtle class Stac ...

  4. python3 turtle 画国际象棋棋盘

    python3 turtle 画国际象棋棋盘 #!/usr/bin/env python # -*- coding:utf-8 -*- # Author:Hiuhung Wan import turt ...

  5. day 03 turtle 画鹅

    turtle 画鹅 import turtle t=turtle turtle.speed(10) t. setup(800,600) #画头 turtle.penup() turtle.goto(0 ...

  6. *【Python】【demo实验31】【练习实例】【使用turtle画小猪佩奇】

    如下图小猪佩奇: 要求使用turtle画小猪佩奇: 源码: # encoding=utf-8 # -*- coding: UTF-8 -*- # 使用turtle画小猪佩奇 from turtle i ...

  7. python3 turtle画正方形、矩形、正方体、五角星、奥运五环

    python3 环境 turtle模块 分别画出 正方形.矩形.正方体.五角星.奥运五环 #!/usr/bin/env python # -*- coding:utf-8 -*- # Author:H ...

  8. python之turtle使用:画一颗美美哒的树

    关于工具介绍这里小生就不赘述了,这里附上个人觉得最详细的文档地址:https://docs.python.org/zh-cn/3/library/turtle.html?highlight=turtl ...

  9. 从零开始学习PYTHON3讲义(十二)画一颗心送给你

    (内容需要,本讲使用了大量在线公式,如果因为转帖网站不支持公式无法显示的情况,欢迎访问原始博客.) <从零开始PYTHON3>第十二讲 上一节课我们主要讲解了数值计算和符号计算.数值计算的 ...

随机推荐

  1. (23)socket多进程并发

    # 对于服务器自己本身,一个程序只能绑定一个端口 # 同一个端口可以多个客户端来连接, # 只要server_ip+ server_port +client_ip + cilent_port 不一样, ...

  2. 【Idea】IntelliJ不停地updating indices的解决办法

  3. p3966单词

    后缀自动机版本: 所有的串用(char)('z'+1)连起来,然后建自动机.再用原串在自动机上跑.跑到的位置的endpos就是出现的次数.不过内存有点大. #include <iostream& ...

  4. widerface---VOC

    import os, h5py, cv2, sys, shutil import numpy as np from xml.dom.minidom import Document rootdir = ...

  5. SWUST OJ(1102)

    顺序表上数据的划分问题的实现 #include <iostream> #include <cstdlib> using namespace std; int main() { ...

  6. Educational Codeforces Round 5F. Expensive Strings

    题意:给n个串ti,ps,i是s在ti中出现的次数,要求找到s,使得\(\sum_{i=1}^nc_i*p_{s,i}*|s|\)最大 题解:sam裸题,每次插入时相当于在fail链上到1的位置加ci ...

  7. 理解Object.defineProperty函数中的get与set

    defineProperty是什么: 该函数可以直接在一个对象上定义一个新属性,或者修改一个对象的现有属性, 并返回这个对象.通俗理解就是: 给对象添加一个新的属性,或者针对对象里的某些属性,可以给这 ...

  8. [luogu P3806] 【模板】点分治1

    [luogu P3806] [模板]点分治1 题目背景 感谢hzwer的点分治互测. 题目描述 给定一棵有n个点的树 询问树上距离为k的点对是否存在. 输入输出格式 输入格式: n,m 接下来n-1条 ...

  9. 高可用性的负载均衡方案之lvs+keepalived和haproxy+heartbeat区别

    高可用性的负载均衡方案 目前使用比较多的就是标题中提到的这两者,其实lvs和haproxy都是实现的负载均衡的作用,keepalived和heartbeat都是提高高可用性的,避免单点故障.那么他们为 ...

  10. 使用 ZipArchive 生成Zip文件备注

    近两日研究了Abp.io 中模板项目的生成原理,是从Github下载源码包,进行修改.替换,然后生成新的zip包提供下载. 项目内部使用了  这个包 Ionic.Zip  Version=" ...