一、创建hello_world.py文件
print("hello world !")
#此处和hello world !可以用"hello world !"也可以用'hello world !',只要配对就可以了,在使用字符串的时候双引号和单引号有妙用
二、变量
message = "Hello Python world!"
print(message)
massage="hello"
print(message)
#①message即为一个变量,可以在任意时候,给变量赋值;
#②两次打印message变量,输出的结果不一样
#③变量的命名方法与规则:
1、message_1 ,message1 ,MessageOfJack,massage_Jack,_massage_等都可以作为变量命名
(变量名可以字母或下划线打头 ,尽量采用massage_Jack这样的格式);
2、1_message , massage Jack或者包含关键字的都是不可以作为变量命名的;
3、在书写变量名称的时候一定要,保持前后一致,尽可能将英文拼写准确,当前后书写不一致时,
会出现NameError: name '******' is not defined 的报错。