Week of Oct. 26
- Class Code: CDF5796C1B
- Sign in with GitHub to submit work
Week of Oct. 19
Resources
Online Python Compiler and Debugger
Week of Oct. 13
Usernames Form
-
Code Combat - Sign in with Clever
Week of Oct. 5
Problems
2. Arithmetic and divisibility
| Operator | Meaning | Example |
|---|---|---|
+ |
Add | 4 + 3 is 7 |
** |
Raise to a power | 2 ** 3 is 8 |
% |
Remainder after division | 14 % 4 is 2 |
== |
Compare for equality | 14 % 2 == 0 is True |
| Skill | Why it matters |
|---|---|
for loop |
Repeat a check for several numbers |
range() |
Generate the numbers between two boundaries |
| Arithmetic operators | Calculate expressions with a changing number |
Modulo (%) |
Test whether division leaves a remainder |
List and .append() |
Collect results that pass a test |
return |
Give a completed list back to the caller |