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

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.

主站蜘蛛池模板: 双峰县| 五河县| 江都市| 古交市| 雷州市| 姚安县| 乌鲁木齐县| 治县。| 定安县| 通许县| 吉安县| 二连浩特市| 德保县| 麻城市| 木兰县| 册亨县| 呼伦贝尔市| 巢湖市| 如皋市| 邢台市| 株洲市| 天水市| 衡阳市| 岫岩| 台前县| 临西县| 新昌县| 从江县| 英超| 庐江县| 巴马| 锡林郭勒盟| 凤凰县| 志丹县| 海原县| 南涧| 洞头县| 南昌县| 资源县| 浦北县| 榕江县|