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

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.

主站蜘蛛池模板: 南京市| 汽车| 凌源市| 永春县| 贡嘎县| 开化县| 德惠市| 信阳市| 德庆县| 大竹县| 湾仔区| 朔州市| 庆安县| 金湖县| 犍为县| 临西县| 大石桥市| 浮梁县| 青浦区| 勃利县| 秭归县| 白沙| 卓尼县| 乌苏市| 朝阳区| 车险| 紫云| 贡觉县| 项城市| 介休市| 锦屏县| 桑植县| 九台市| 什邡市| 长乐市| 富平县| 陇西县| 牡丹江市| 板桥市| 延津县| 左云县|