** Variable name = Value ** "" Can also be "". However, "" is easier to judge half-width and full-width. Two or more words should be separated by _.
name = "chikazu"
user_name = "chikazu"
For variables, do not add "" or ``.
print(name)
① Overwrite price = 100 with 200. Just define it as it is.
price = 100
print(price)
price = 200
print(price)
(2) Assign a numerical value calculated to price = 100 to a variable. The example is +, but other four arithmetic operations are also possible. This time, 300 is output at 100 + 200.
price = 100
print(price)
price += 200
print(price)
Recommended Posts