官术网_书友最值得收藏!

Testing Python

The steps for testing Python are as follows:

  1. For PC users, after clicking All Programs, Anaconda3.6, and then Anaconda Prompt, we would see the following.

Note that different users would probably get a different path:

  1. Then, just type python, and we can launch it, as shown here:
  1. It tells us that Python 3.6.3 was operational. We could also try import scipy as sp to see if it is preinstalled:
  1. After we type import scipy as sp, no error message appears, which indicates that the package was preinstalled. The command of sp.sqrt(3) would offer us the square root of 3. Another example with the related graph is shown here:
import scipy as np 
from pylab import * 
x=np.linspace(-np.pi,np.pi,256,endpoint=True) 
c,s=np.cos(x),np.sin(x) 
plot(x,c),plot(x,s) 
show()  

The previous code will give an output such as the following:

主站蜘蛛池模板: 南宁市| 章丘市| 安仁县| 龙州县| 卫辉市| 顺义区| 三台县| 赤峰市| 达日县| 阜平县| 栾川县| 阿鲁科尔沁旗| 且末县| 南溪县| 定结县| 洞头县| 高雄县| 寻乌县| 潮安县| 桂林市| 琼结县| 墨玉县| 绍兴县| 长宁区| 寿宁县| 大关县| 广汉市| 冀州市| 思南县| 民县| 禄丰县| 甘肃省| 安仁县| 崇明县| 长宁区| 徐闻县| 贡嘎县| 拜城县| 南城县| 育儿| 眉山市|