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

The print() function

In our first helloworld example, we discussed printing something on the screen. We used the print() function to obtain our result. In Python, a function is a code block that executes a set of defined tasks. The print() function is a part of Python's standard library that prints any combination of alphanumeric characters that is passed as an argument between the quotes. The print() function is used to print information to the screen. It is especially helpful while trying to debug the code. In this example, the print() function was used to print a message on the screen.

In this chapter, the function print() executed the string I am excited to learn Python programming with the Raspberry Pi Zero (we will discuss strings in the later section of this book). It is also possible to write custom function to execute a repetitive task required by the user.

Similarly, the exit() function executes the predefined task of exiting the Python interpreter at the user's call.

主站蜘蛛池模板: 育儿| 越西县| 新河县| 阿拉尔市| 宝兴县| 大关县| 西平县| 罗源县| 乐平市| 乌拉特前旗| 阿尔山市| 监利县| 贵州省| 柳江县| 德阳市| 迁安市| 中卫市| 漳浦县| 元谋县| 正蓝旗| 上思县| 阿尔山市| 巴南区| 彰武县| 潜山县| 瑞安市| 茂名市| 札达县| 长岭县| 饶平县| 石河子市| 宁夏| 寿宁县| 广昌县| 余姚市| 平定县| 滦南县| 眉山市| 子长县| 临高县| 鄂伦春自治旗|