摘要:
导入numpy 和 matplotlib import numpy as np import matplotlib.pyplot as plt sinx函数图像 x = np.arange(0,6,0.1)#0.1步长,生成0到6的数据 y = np.sin(x) plt.plot(x,y) sin 阅读全文
摘要:
1.冒泡排序 #bubble sort #时间复杂度为o(n^2) #升序和降序只需要改动其中的一个箭头方向即可 def bubble_sort(li): count=1 for i in range(len(li)-2): exchange=False for j in range (len(li 阅读全文
摘要:
1.print的语法 print("666"+"what can I say"+" .")#+的使用 print("He said \"Let's go\"")#打印“的方法 print("ok\nyou are right")#换行符和c语言一样 print("""床前明月光, 疑似地下霜。 举头 阅读全文