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

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.

主站蜘蛛池模板: 佛坪县| 克拉玛依市| 桂平市| 平罗县| 大兴区| 岳普湖县| 鲁甸县| 广饶县| 花莲县| 长海县| 马公市| 长丰县| 大渡口区| 凌海市| 陇南市| 仙桃市| 清丰县| 应城市| 阳东县| 洪泽县| 天柱县| 长治县| 安徽省| 聂拉木县| 上蔡县| 揭西县| 合肥市| 文成县| 海晏县| 民和| 临颍县| 郑州市| 松潘县| 公安县| 拜泉县| 崇文区| 喀什市| 绿春县| 安宁市| 彭阳县| 钦州市|