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

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:

主站蜘蛛池模板: 新津县| 都安| 沽源县| 句容市| 涞水县| 会泽县| 玉环县| 温宿县| 桐乡市| 筠连县| 黄浦区| 德阳市| 明星| 松江区| 石城县| 绥宁县| 仁寿县| 曲松县| 洛南县| 阜宁县| 竹山县| 平顶山市| 南江县| 思南县| 府谷县| 壶关县| 晋城| 开远市| 通海县| 鄱阳县| 扬中市| 龙胜| 天柱县| 临湘市| 方城县| 台州市| 刚察县| 徐闻县| 来安县| 阿克苏市| 榆社县|