More info about basic types
This commit is contained in:
parent
85bb4c9f28
commit
d4fe711e10
|
@ -17,6 +17,15 @@ name = "Computer User"
|
||||||
# separating them with commas
|
# separating them with commas
|
||||||
print("Your name is:", name)
|
print("Your name is:", name)
|
||||||
|
|
||||||
|
# There are several basic data types for variables:
|
||||||
|
# int: Integer number (no decimal)
|
||||||
|
# float: Floating point number (has a decimal component)
|
||||||
|
# str: String. This is a collection of characters bounded by single or double quotes
|
||||||
|
# bool: Boolean. This is either True or False
|
||||||
|
# bytes: A string that holds binary data
|
||||||
|
# Created thusly: b"\x28\x67\x67\x29" (converts to the ascii characters "(gg)")
|
||||||
|
# More info: https://realpython.com/python-data-types/
|
||||||
|
|
||||||
# Our first number
|
# Our first number
|
||||||
# The "=" here is an "assignment operator"
|
# The "=" here is an "assignment operator"
|
||||||
# meaning "assign the value on the right to the variable on the left"
|
# meaning "assign the value on the right to the variable on the left"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user