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接口

  • 相关阅读:
    SpringCloud微服务基础学习
    EF6 + MySql 建立项目引用失败
    Forword(请求转发)与Redirect(重定向)区别
    Java 中 Hashtable与HashMap的区别
    cookie和session
    configparser模块的简单使用
    列表中的陷阱
    Python3面向对象编程总结
    Python---RabbitMQ的使用
    Django的template自定义函数的创建和使用
  • 原文地址:https://www.cnblogs.com/dzzy/p/5140899.html
Copyright © 2011-2022 走看看