【py code everyday line one】2023-02-20

本章介绍了Python中可处理的不同类型数据以及如何使用变量来存储数据。例如,通过变量message存储HelloPythonWorld!文本,并用print()函数输出。添加变量虽增加了解释器的工作量,但使得程序更具灵活性。
摘要由CSDN通过智能技术生成

Chapter 2

In this chapter you’ll learn about the different kinds of data you can work with in
your Python programs.
You’ll also learn how to use variables to represent data in your programs

For example, when the interpreter sees the word print followed by parentheses, it prints to the screen whatever is inside the parentheses(括号).

This feature is called syntax highlighting (语法突出)and is quite useful as you start to write your own programs

use a variable in xx.py, add a new line at begining of the file, and modify the second line

message = "Hello Python World!"
print(message)

We’ve added a variable named message.In this case the value is the “Hello Python world!” text.
Adding a variable makes a little more work for the Python interpreter(增加了点工作量)

Add a blank line(一个空白行) to hello_world.py

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值