练习题第二题
This commit is contained in:
@@ -0,0 +1,6 @@
|
|||||||
|
# 练习题2: 使用 numpy.linspace 生成等差数列
|
||||||
|
# 题目: 使用 numpy.linspace 函数生成一个从0开始到10结束(包含10),步长为2的等差数列。
|
||||||
|
import numpy as np
|
||||||
|
|
||||||
|
a = np.linspace(0,10,6)
|
||||||
|
print(a)
|
||||||
Reference in New Issue
Block a user