练习题第二题

This commit is contained in:
2024-09-30 20:44:24 +08:00
parent d8d5e3de04
commit c5b55563e6
+6
View File
@@ -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)