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

Chapter 3. Calculate This!

In the previous chapter, you learned about the uses of variables, different data types, and functions. You created your own function and learned how to get basic information from a user with the raw_input() function. Using these building blocks, you can begin to design basic programs.

The first program we make will be a five-function calculator that calculates two numbers as input. The calculator will help us learn to understand the mathematical functions that are a part of Python, which will be useful for our game at the end of the book. In addition to this, this calculator will form the foundation for a more complex calculator in Chapter 5, Loops and Logic.

主站蜘蛛池模板: 深水埗区| 玛沁县| 房山区| 连山| 海阳市| 桓仁| 阿荣旗| 启东市| 祁门县| 娄底市| 临海市| 大连市| 永靖县| 吐鲁番市| 纳雍县| 桂阳县| 吕梁市| 乌鲁木齐市| 津南区| 理塘县| 海门市| 万山特区| 宁远县| 新竹市| 鸡东县| 蒙自县| 涞水县| 洪洞县| 龙陵县| 凌源市| 垦利县| 息烽县| 江山市| 蒲江县| 抚顺县| 泰兴市| 新竹市| 兴城市| 沁源县| 武义县| 怀宁县|