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

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:

主站蜘蛛池模板: 宁南县| 菏泽市| 全南县| 大同市| 三门峡市| 枞阳县| 句容市| 怀宁县| 凤冈县| 北京市| 华安县| 建昌县| 井陉县| 大城县| 磴口县| 和平区| 体育| 资兴市| 玉树县| 陆丰市| 平顶山市| 阳东县| 光山县| 江达县| 铅山县| 英吉沙县| 杭锦后旗| 阿勒泰市| 吴忠市| 浪卡子县| 苏尼特左旗| 龙海市| 广灵县| 天镇县| 东莞市| 正宁县| 辽源市| 土默特右旗| 吴旗县| 广饶县| 麟游县|