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)

    
    
    
    
    
     
  • 相关阅读:
    图论-最短路模版
    图论-最小生成树模版
    图论-并查集模版
    数论-矩阵快速幂模版
    数论-GCD && 欧拉函数 && 快速求幂
    对象池技术
    页游代码、资源文件的优化
    页游加速检查
    扩展类与父类继承函数的前后关系
    关于ADDED_TO_STAGE事件
  • 原文地址:https://www.cnblogs.com/BOBOWZH/p/8603321.html
Copyright © 2011-2022 走看看