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

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:

主站蜘蛛池模板: 兰坪| 常德市| 基隆市| 临湘市| 崇仁县| 孝感市| 东乡县| 即墨市| 松江区| 石屏县| 淅川县| 远安县| 铅山县| 津南区| 潞西市| 获嘉县| 罗城| 龙州县| 二连浩特市| 通化县| 汉寿县| 手游| 昭苏县| 陆河县| 张家界市| 伊通| 临沂市| 乌什县| 林口县| 文登市| 金堂县| 闻喜县| 长泰县| 大邑县| 眉山市| 华蓥市| 崇州市| 广宁县| 凯里市| 铜鼓县| 涟源市|