All posts
What is a hacker? Stories of famous hackers
As the IT industry grows, interest in computer security keeps rising. Whenever security comes up, the word "hacker" follows. Hackers are often grouped into several labels - white hat hacker, black hat hacker, cracker, hacktivist, and more. Today we'll look at what a hacker is and what each of those labels actually means.
Python Basics #20 — Modules and Packages Vol. 2
Continuing from the previous lesson on modules, this post covers packages: how to organize modules into folders, sub-packages, the role of __init__.py, and convenient imports for users.
Python Basics #20 — Modules and Packages Vol. 1
Modules and packages aren't hard. This lesson explains what modules are, why we use them, how Python resolves imports, and how to create and import your own modules.
Python Basics #19 — Errors and Exception Handling
Handle errors gracefully with try/except/else/finally. Catch specific built-in exceptions, fall back to a base Exception, and understand why the order of except clauses matters.
Python Basics #18 — File Read/Write Vol. 2
Continuing from the previous lesson, this post covers writing files in Python — w/x/a modes, write vs print, persisting and reloading list/dict data, and append-mode caveats.
Python Basics #17 — File Read/Write Vol. 1
Read and write text files in Python: the open function, file modes, the cursor model, read vs readlines vs iterating the file object, and a memory/performance comparison.
Python Basics #16 — Functions
Learn Python functions: defining and calling, parameters and arguments, default values, returning values, namespaces, and refactoring repeated code into reusable functions (D.R.Y.).
Python Basics #15 — for Loop
Python's for loop is used to iterate over a collection of data. It's similar to while in many cases but more convenient, so it's the more commonly used loop.
Python Basics #14 — while Loop
Python provides two loop statements: while and for. The while loop has a test block and a body — it evaluates the test, runs the body if True, and repeats until the test becomes False.
Python Basics #13 — if Statement
An if statement has if, elif, and else blocks. Each block has a test expression and a body that runs when the test passes. If the test is True the body runs; if False the next elif is tested; if all tests are False the else body runs.
Python Basics #12 — Control Flow & Operators
Just like people make decisions based on conditions, programs need to choose what to run based on conditions. Control-flow statements drive that, and operators feed the conditions. This lesson covers the concepts and walks through arithmetic, assignment, comparison, logical, identity, and membership operators.
Python Basics #11 — Sets
Python's set data structure: defining sets, characteristics (unordered, no duplicates, hashable items only), and useful set methods like union, intersection, and difference.