The First Code
print ("Hello World!!!")
What is the variables?
Variables are used to store information to be referenced and manipulated in a computer program. They also provide a way of labeling data with a descriptive name, so our programs can be understood more clearly by the reader and ourselves. It is helpful to think of variables as containers that hold information. Their sole purpose is to label and store data in memory. This data can then be used throughout your program
The Rules of Variable Naming
<The variables should mean something>
name = "Aaron"
age = 18
print (name, age)
<There are two types of coding>
student_number = 40 #We prefer to use this type of coding.
studentNumber = 40
<The name of variable can only consist of _, numbers and letters, but special characters including the blank spece>
<Do not use Chinese to name a variable>
姓名 = "Aaron"
年龄 = 18
print (姓名, 年龄)# The computer will not report an error, but these codes violate the programming specification.
<Do not use a number, a capital letter or a blank space as the begining of the variable>
<Do not use the reserved characters>
In python, we always use the capital letters to code a constant. Actually, python does not distinguish between constants and variables, all are variables.