CH2 - Python Basics
CH2 - Python Basics
CHAPTER 2
PERFORMING OUTPUT
• They get their data type depending on how they are assigned
• Python is Case Sensitive
• Output can be combined using a +
DATA TYPES
• List - changeable
• They are declared using square brackets
LIST METHODS
• Python has a set of built-in methods that you can use on their collection of data structures.
• There are other functions. Try the len() function. What do you think it does?
TUPLES
• Tuple - unchangeable
• They are declared using round brackets
TURPLE METHODS
+ Addition x+y
- Subtraction x-y
* Multiplication x*y
/ Division x/y
% Modulus x%y
** Exponentiation x ** y
== Equal x == y
!= Not equal x != y
> Greater than x>y
< Less than x<y
>= Greater than or equal to x >= y