More info about basic types

This commit is contained in:
Junior 2024-06-12 13:06:18 -04:00
parent 85bb4c9f28
commit d4fe711e10

View File

@ -17,6 +17,15 @@ name = "Computer User"
# separating them with commas
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
# The "=" here is an "assignment operator"
# meaning "assign the value on the right to the variable on the left"