CS 111 -1/23/18
Last Class:
Assignment statements
variables
expressions
Operators and Precedence
1. ( )
2. **
3. * / // %
integer division 7 / 2 ==> 3
floating point division 7 / 2 ==> 3.5
In Python 2: / is integer division // is float div.
In Python 3: / is float division // is integer div
% is the modulus operator
which is the remainder from an integer division
4. + -
Data Types / Storage Types
integer - whole numbers ( positive and negative )
floating point number - numbers with decimal values
- this is often called a "double"
boolean - value that are either TRUE or FALSE
character - a single ASCII value (anything typable on a keyboard)
string - sequence of characters