python入门
沁荣
这个作者很懒,什么都没留下…
展开
-
变量与简单的数据类型
#自定义变量,并打印一句话simple_message = "Welcome python"print(simple_message)Welcomr python#修改变量值再将其打印simple_message = "Welcome python"print(simple_message)simple_message = "Hello python cresh course r...原创 2019-04-21 15:31:13 · 104 阅读 · 0 评论 -
菜鸟教程
http://www.runoob.com/python3/python3-tutorial.html[python学习]简介转载 2019-04-21 17:28:53 · 190 阅读 · 0 评论 -
函数
第八章8-2def display_message(chapter): """简单的语句""" print("本章学习 " + chapter)display_message('函数')本章学习 函数def favorite_book(title): """tushu""" print("woxihuaned " + title + ".") ...原创 2019-04-21 16:07:10 · 130 阅读 · 0 评论 -
用户输入和while循环
第七章7-1cars = input("What kind of car would you like to rent?")print("Let me see if can find you a " + cars)7-2number = input("How many people are there in your party?")number = int(number)if ...原创 2019-04-21 16:00:21 · 359 阅读 · 0 评论 -
字典
6-1My_frind = {'frist_name': 'yang', 'last_name': 'ping', 'age': '23','city': 'ning xia'}print(My_frind){'frist_name': 'yang', 'last_name': 'ping', 'age': '23', 'city': 'ning xia'}6-2Love_numbe...原创 2019-04-21 15:53:00 · 103 阅读 · 0 评论 -
if语句
if语句Python中,if语句让你能够检查程序的当前状态,并据此采取相应的措施。5-1coffers = ['拿铁','美式','卡布奇诺','coco' ]for coffer in coffers: if coffer == '拿铁': print(coffer) else: print(coffer)5−25-25−2messa...原创 2019-04-21 15:41:37 · 355 阅读 · 0 评论 -
操作列表
第四章 操作列表#4-1披萨pizzas = ['new york style','chicago style','california style','pan pizza']for pizza in pizzas: print("I like " + pizza.title() + " pizza!")print("I really love piaaz!")I like N...原创 2019-04-21 15:38:16 · 116 阅读 · 0 评论 -
列表简介
第三章 列表简介#列一个列表names = ['xiaolizi','xiao yang','xiao hui','xiao zhang']print(names)['xiaolizi', 'xiao yang', 'xiao hui', 'xiao zhang']#第一次接触MarkdownE=U⋅diag([S11+S222,S11+S222,0])⋅VT E = U·diag...原创 2019-04-21 15:35:29 · 140 阅读 · 0 评论 -
matplotlib
import numpy as npimport matplotlib.pyplot as pltx = np.arange(0, 6, 0.1)y = np.sin(x)plt.plot(x, y)plt.show()import numpy as npimport matplotlib.pyplot as pltx = np.arange(0, 6, 0.1)y1 = n...原创 2019-04-27 23:12:44 · 120 阅读 · 0 评论