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

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.

主站蜘蛛池模板: 呼伦贝尔市| 桑植县| 吉水县| 海安县| 敖汉旗| 呼和浩特市| 余干县| 绥江县| 女性| 米林县| 镇原县| 美姑县| 宿州市| 库伦旗| 正阳县| 明光市| 大安市| 伽师县| 来宾市| 成武县| 蚌埠市| 明星| 白玉县| 虞城县| 启东市| 元江| 南昌县| 和平区| 枞阳县| 德州市| 外汇| 新建县| 大关县| 斗六市| 双桥区| 淮南市| 谷城县| 渭源县| 岫岩| 三河市| 庆安县|