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

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.

主站蜘蛛池模板: 武义县| 黄平县| 普兰县| 忻城县| 尤溪县| 勐海县| 正阳县| 玉山县| 洛川县| 南阳市| 高安市| 高雄市| 胶州市| 徐汇区| 桃园市| 白河县| 左贡县| 淮安市| 水城县| 商城县| 集安市| 盘锦市| 盐山县| 丹江口市| 阜阳市| 正镶白旗| 白城市| 兴义市| 乌苏市| 汝阳县| 栖霞市| 新民市| 漳平市| 渑池县| 鄱阳县| 泰来县| 宾川县| 岑溪市| 驻马店市| 中西区| 叙永县|