- Introduction to Python
- Python: Choosing a Text Editor or IDE
- Python: Hello World
- Python: Variables, Strings and Numbers
- Python: Variable Naming
- Python: Math, Familiar
- Python: Math, Less Familiar
- Python: Mathematical Order of Operations
- Python: Introducing PEP 8
- Python: Text Concatenation
- Python: if Statements and Comparison Operators
- Python: else and elif statements
- Python: Testing Multiple Conditions
- Python: Testing Sets of Conditions
- Python: Nested if Statements
- Python: Lists
- Python: Adding To and Changing Lists
- Python: Lists: Take a Slice, Delete Elements, Popping Elements
- Python: Tuples
- Python: for Loops
- Python: Nested for Loops
- Python: Capturing and Formatting User Input
- Python: Dictionaries
- Python: Functions
- Python: While Loops
- Python: Data Files
- Python: Using Pexpect
- Python : Using Pexpect : ftpTestOffload.sh
- Python : Using Pexpect: ftpTest.py
- Python: DCL Conversion to Python
Go to Chapter 12 of A Smarter Way.
What do you do if a test needs to meet two conditions at once? (Is this person both a Person and a Friend?)
This is where the keywords and and or come into play.
if student_count > 10 and chairs_count <= 10: print("Somebody's going to be standing.")
You can use more than one and or or in the test:
if (doughnuts == 12 or crullers == 12)and coworkers_count <= 12: print("Everybody gets a goodie.")
Use parens to establish order of operations.
- Continue editing examples.py.
- Create one example of a single and test, and one example of a single or test.
- Create one example of a test that involves more than one and or or.