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

Introducing Spyder

In the Anaconda3 menu, the last entry is Spyder. After clicking it, we can launch Spyder, shown here:

The preceding screenshot shows three panels. The left panel is for writing and editing our programs, the bottom-right panel is for command lines (we could type simple commands there), and the top-right panel is for our variables. For example, after we type pv=100, it would show the variable name, type, size, and value, as shown here:

We could also write our Python program, and debug and run them via the top-left panel. For example, we could run a program with pv_f() function to estimate the present value of one future cash flow, shown here:

In the preceding screenshot, the green play button is for running the whole Python program, while the second green-yellow one is for partially running it. This feature makes our debugging efforts a little easier, which is especially true for a long and complex program.

Assume that we plan to debug such a program. First, we pide it into a few logic blocks. Then, we highlight the first block and run it. After it is bug free, we go to the next block. We continue this way until we debug the whole program.

主站蜘蛛池模板: 通河县| 康马县| 康定县| 甘肃省| 石家庄市| 东明县| 北安市| 邹平县| 鸡东县| 宜丰县| 辽阳县| 兴安盟| 体育| 元谋县| 江陵县| 福建省| 前郭尔| 盐山县| 通山县| 湘阴县| 阿荣旗| 巴彦县| 湛江市| 侯马市| 淮南市| 锦屏县| 邯郸县| 南宁市| 新竹县| 海阳市| 尖扎县| 凌源市| 富锦市| 宁阳县| 商水县| 泾川县| 固镇县| 竹溪县| 丹棱县| 乌恰县| 富蕴县|