print('Time to Jump In!')Time to Jump In!
Notebook introducing datatypes and operators
Python stores information as types.
Use the type function to see this information.
Remember syntax determines type.
Below examples show numeric and special values as string type because of the use of quotes.
Used to manipulate and evaluate values.
Basic operators inlcude: Mathematical, Logical, Comparison, and Assignment
Mathematical operators perform arithmetic calculations. In Python, these include + (addition), - (subtraction), * (multiplication), and / (division). Python uses // for integer division. Regular division will return a float value, while integer division will discard the remainder and return an integer.shown here, but available are also ** or ^ (exponentiation), and % or %% (modulus).
Comparison operators evaluate relationships between values. Common operators in Python include == (equal), != (not equal), < (less than), <= (less than or equal to), > (greater than), and >= (greater than or equal to).
These return boolean values of True/False.
Logical operators allow for boolean logic. In Python: and, or, not. These are used in conditionals and loops to combine multiple logical expressions.
Assignment uses = to assign a value to a variable. x = 10 creates or updates the variable x to be 10.
Equality checking uses == and returns a Boolean (True, or False) depending on if the values are equal. x == 10 will return True if x is set as above.