This is the table of contents for Week 7. The eight trainers below are self-paced notebook-style pages — you type a line of real Python, run it in your browser, and see what happens. Walk them in order. Then the deck, the Lab, and the Homework pull it together.
Week 7 covers what a computer-science intro spreads across half a semester — types, file paths, conditionals, loops, functions, reading files — plus a first look at pandas. That is intentional. The real skill this week is taking on a large, unfamiliar technical task with AI in the loop, which is exactly how this work happens on the job.
So use the help. Every trainer has a built-in tutor (it coaches, it will not hand you the answer). Every Lab and Homework section carries a copy-able starter prompt. And the rule stays the same as always: stretch and try the core moves by hand first, then let AI explain what you could not get on your own. Do not paste code you cannot explain.
Start at the top and work down. Each one is short, runs in your browser, and maps a Python move onto a spreadsheet move you already know.
int, float, str,
bool), and why money math needs round(x, 2) — floating-point division
comes out long.
Excel bridge: the value in a cell, and number formatting.
File > Open.
if / elif / else, and combining tests with
and / or, the logic that decides what happens to each row.
Excel bridge: =IF(...), AND(),
OR(), and a nested IF becomes elif.
for loop does the same step to every item, and an accumulator builds a
running total as it goes. One loop replaces dragging a formula down a thousand rows.
Excel bridge: dragging a formula down every row; a running-total column;
SUMIF.
read() for the whole thing,
readlines() for a list of lines, and pd.read_csv() for a table, and call a
function you already defined.
Excel bridge: File > Open, three ways.
+=, then .cumsum(). Watch the two stay in step.
Excel bridge: the running-total column you drag down.
XLOOKUP.
Rung 6.5 (the accumulator bridge) sits between loops and reading files — it reinforces the loop idea against a live Excel column, so open it once you have done loops.
The trainers are practice. These three are the week itself — the lecture to watch, the Lab to build, and the Homework to submit.
Week 7 of ACCTG 5150, Accounting Analytics. Trainers run real Python in your browser (sandboxed, nothing leaves your machine).