random_walk.py # -*- coding: utf-8 -*- """ Created on Sun Oct 22&…
标签:Python
Python chapter 11 learning notes
测试 单元测试和测试用例 单元测试:核实函数的某个方面没有问题; 测试用例:一组单元测试,这些单元测试一起核实函数在各种情形下的行为都符合要求; 全覆盖式测试用例包含一整套单元测试,涵盖了各种可能的函数使用方式。 可通过的测试 要为函数编写…
Python chapter 10 learning notes
·Reading data from file oFormat: with open('pi_digits.txt') as file_object: &nb…
Python chapter 9 learning notes
·CLASS For example, class Restaurant(): def __init__(self, restaurant_name, …
Python chapter 8 learning notes
·定义一个函数 For example, def greet_user():#定义函数 print("Hello!") Now, we just need to …
安装package control的几种方法
在线安装: import urllib.request,os,hashlib; h = '6f4c264a24d933ce70df5dedcf1dcaee' + 'ebe013ee18cced0ef93d5f746d…
Python chapter 7 learning notes
l 函数input()工作原理 n 示例演示了一种创建多行字符串的方式,第一行将消息的前半部分存储在变量prompt中,第二行,+=在存储在prompt中的字符串末尾附件一个字符串。 例如: prompt = &qu…