传统弱校HFUT的蒟蒻,真相只有一个

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

posted @ 2016-01-19 00:05  未名亚柳  阅读(460)  评论(0编辑  收藏  举报