• Python学习笔记一


    原来Python的文件配置好环境变量直接双击就可以运行,当然也可以控制台+编辑器

    first try:

    import turtle
    window=turtle.Screen()
    babbage=turtle.Turtle()
    babbage.left(90)
    babbage.forward(100)
    babbage.right(90)
    babbage.circle(50)
    window.exitonclick
    import turtle
    #creat window and turtle
    window=turtle.Screen()
    babbage=turtle.Turtle()
    #draw stem and centre
    babbage.hideturtle()
    babbage.color("blue","black")
    babbage.left(90)
    babbage.forward(100)
    babbage.right(90)
    babbage.color("black","white")
    babbage.begin_fill()
    babbage.circle(10)
    babbage.end_fill()
    #draw all petal
    for i in range(1,24):
        if babbage.color()==("red","black"):
            babbage.color("orange","black")
        elif babbage.color()==("orange","black"):
            babbage.color("green","black")
        else:
            babbage.color("red","black")
        babbage.left(15)
        babbage.forward(50)
        babbage.left(157)
        babbage.forward(50)
        babbage.hideturtle()
    #tidy up window
    window.exitonclick()
    Flower

    deepin中的.py文件可以在terminal直接运行,有时会生成.pyc文件,相当于缓存类型,也可以直接执行

    23333买了树莓派快递运丢了......没办法希望快递公司陪全款,只能祝好运了

    树莓派已到,中通坑死

    Python的34个保留关键字

    if else elif not or and is True False None for in while break as continue print pass del

    class def global lambda nanlocal yield import return from try except finally raise assert with

    Python其他使用import加载模块

    import time 时间

    RPi.GPIO GPIO接口

    Pygame 游戏开发框架

    SimpleCV 简易计算机视觉库

    Scipy 科学计算

    Numpy Scipy的数值基础库

    Flask 微型Web开发框架

    Requests HTTP协议库

    PIL 图像处理

    wxPython 图形用户界面框架

    PySerial 串口通信

    pyUSB FTDI-USB接口

  • 相关阅读:
    BZOJ2763 [JLOI2011]飞行路线(SPFA + DP)
    HDU5838 Mountain(状压DP + 容斥原理)
    HDU4787 GRE Words Revenge(AC自动机 分块 合并)
    HDU5909 Tree Cutting(树形DP + FWT)
    HDU5456 Matches Puzzle Game(DP)
    SPOJ DQUERY D-query(主席树)
    POJ2104 K-th Number(主席树)
    Tsinsen A1493 城市规划(DP + CDQ分治 + NTT)
    BZOJ3438 小M的作物(最小割)
    BZOJ1565 [NOI2009]植物大战僵尸(拓扑排序 + 最大权闭合子图)
  • 原文地址:https://www.cnblogs.com/dzzy/p/5140899.html
Copyright © 2020-2023  润新知