zoukankan      html  css  js  c++  java
  • 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接口

  • 相关阅读:
    设计模式(行为模式)之 观察者模式
    java 内存区域 (程序计数器)
    java 枚举的应用
    ServiceLoad 应用(链式编程:统一执行某一类功能、、分支语句优化)
    python前端学习之css
    python学习四十四天(前端之HTML标签)
    python学习四十三天(网络IO模型)
    python学习四十二天(协程)
    python学习四十一天(线程)
    python学习四十天(进程池)
  • 原文地址:https://www.cnblogs.com/dzzy/p/5140899.html
Copyright © 2011-2022 走看看