zoukankan      html  css  js  c++  java
  • 红旗

    五星红旗
    import
    turtle def goto(x,y): turtle.up() turtle.goto(x,y) turtle.down() def draw(x): turtle.begin_fill() for i in range(5): turtle.forward(x) turtle.right(144) turtle.end_fill() turtle.setup(600,400,0,0) turtle.color('yellow') turtle.bgcolor('red') turtle.fillcolor('yellow') goto(-250,75) # turtle.up() # turtle.goto(-250,75) # turtle.down() draw(100) # turtle.begin_fill() # for i in range(5): # turtle.forward(100) # turtle.right(144) # turtle.end_fill() goto(-100,175) # turtle.up() # turtle.goto(-100,150) # turtle.down() turtle.right(6) draw(50) # turtle.begin_fill() # for i in range(5): # turtle.forward(50) # turtle.right(144) # turtle.end_fill() goto(-100,-25) draw(50) goto(-70,108) draw(50) goto(-70,42) turtle.left(2) draw(50) turtle.done()




    字符串练习
    
    
    html = 'http://news.gzcc.cn/html/2018/xiaoyuanxinwen_0314/9024.html'
    print(html[-14:-5], '\n ----------------------')
    
    html_end = '.html'
    html1 = 'https://docs.python.org/dev/library/'
    a = ['string', 'sys', 'turtle', 'os']
    for g in a:
        html = html1 + str(g) + html_end
        print(html)
    print('\n ----------------------')
    
    new_html = 'http://news.gzcc.cn/html/2018/xiaoyuanxinwen/'
    new=new_html+'index'+html_end
    print(new)
    for i in range(2, 229):
        new = new_html + str(i) + html_end
        print(new)

    
    
    
    
    
     
  • 相关阅读:
    删除排序链表中的重复元素
    爬楼梯
    Sqrt(x)
    Add Binary
    fremarker导出word list
    url中文参数乱码问题
    取值范围
    动态添加echarts
    格式化数据保留两位小数,输入格式为 :xxx,xx,,,,x,,(x为浮点数)
    使用poi读取Excel文件数据
  • 原文地址:https://www.cnblogs.com/BOBOWZH/p/8603321.html
Copyright © 2011-2022 走看看