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

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.

主站蜘蛛池模板: 江阴市| 钟山县| 珠海市| 阿拉善右旗| 四会市| 龙胜| 绩溪县| 工布江达县| 塘沽区| 静宁县| 东城区| 大悟县| 汝南县| 汤阴县| 无极县| 阳曲县| 自治县| 敦煌市| 离岛区| 姜堰市| 湾仔区| 宜城市| 顺义区| 宁乡县| 苏尼特右旗| 大化| 绍兴市| 互助| 方正县| 孟津县| 广河县| 济阳县| 依安县| 兰西县| 龙口市| 钦州市| 麻阳| 宣化县| 本溪| 三穗县| 江油市|