Python เบื้องต้นสำหรับ Data Science
Hillary Green-Lerman
Lead Data Scientist, Looker

name = "Bayes"
height = 24
weight = 75.5
my_var ต่างจาก MY_VAR)# Valid Variables
bayes_weight
b
bayes42
# Invalid Variables
bayes-height
bayes!
42bayes
bayes-height = 3
File "<stdin>", line 1
bayes-height = 3
^
SyntaxError: can't assign to operator
float: แทนจำนวนเต็มหรือทศนิยม
height = 24
weight = 75.5
string: แทนข้อความ ประกอบด้วยตัวอักษร ตัวเลข ช่องว่าง และอักขระพิเศษได้
name = 'Bayes'
breed = "Golden Retriever"
owner = DataCamp
File "<stdin>", line 1, in <module>
owner = DataCamp
NameError: name 'DataCamp' is not defined
fur_color = "blonde'
File "<stdin>", line 1
fur_color = "blonde'
^
SyntaxError: EOL while scanning string literal
name = "Bayes"
height = 24
weight = 75
print(height)
24
Python เบื้องต้นสำหรับ Data Science