Variable
A storage location that can hold integers, floating points and strings
Variable Naming Rules
Choose a meaningful name
Lower case letters
Join words with an underscore
Cannot be a keyword
=
Used to assign a value to a variable
*
Multiplication
/
Division
**
Exponentiation
Print()
Print function
Arguments are the information that is put inside the parentheses
When the parentheses contain no argument, it prints a blank line
Automatically goes to the next line after print function is complete
A print statement can print more than one variable if a comma is used between
String
A string consists of characters enclosed in a ‘ ‘ or “ “, as long as it is consistent
Sep=“”
Is an optional argument that changes the separation between variables in a print function
Docstring
A special kind of string used to describe the program, and is not a part of the program
Created with “”” “””
Docsting contains author and description of what the program does
//
Floor division
Performs normal division but ignores everything after the decimal point, so gives an integer
%
Modulus
Performs division and gives the remainder
If denominator larger than nominator, the it gives the nominator
B E DMMF AS
Brackets
Exponents
Mulitiplication, Division, Modulus & Floor Division
Addition & Subtraction
Ones of same priority are worked out from left to right in a sequence
Integer
A numerical value that is a whole number
Floating point
Decimal