Picture Monday morning. You open four spreadsheet tabs, copy three numbers into an email, manually format the dollar signs and percentages, then hit send. Every week. What if the numbers formatted themselves?
I've been doing that for two years. I assumed it was just... part of the job.
It was — until now. This week you learn how Python holds a single value the way a named cell holds a KPI. A variable is just a cell with a name you chose. An f-string is the formatted callout line in that email. And a simple if/elif/else is the "flag it red if spend exceeds budget" rule you've been doing by eye.
So by the end of the week I can write code that spits out the formatted line I normally type by hand?
Exactly that. Five short functions, each adding one layer. Day 3 formats one campaign label. Day 4 normalises the messy name HubSpot exported. Day 5 builds the full KPI callout with thousands separators. Day 6 checks whether spend blew the budget. Day 7 categorises performance as on target, over target, or critical. By the end you have the raw pieces of the quarterly report you'll finish in Week 4.
"Email Blast — $1,250.00" with an f-stringstrip(), lower(), and replace()f"{spend:,.2f}""on target", "over target", or "critical" with if/elif/elseGoal: by Friday you can format one campaign row entirely in code.
7 lessons this week
Picture Monday morning. You open four spreadsheet tabs, copy three numbers into an email, manually format the dollar signs and percentages, then hit send. Every week. What if the numbers formatted themselves?
I've been doing that for two years. I assumed it was just... part of the job.
It was — until now. This week you learn how Python holds a single value the way a named cell holds a KPI. A variable is just a cell with a name you chose. An f-string is the formatted callout line in that email. And a simple if/elif/else is the "flag it red if spend exceeds budget" rule you've been doing by eye.
So by the end of the week I can write code that spits out the formatted line I normally type by hand?
Exactly that. Five short functions, each adding one layer. Day 3 formats one campaign label. Day 4 normalises the messy name HubSpot exported. Day 5 builds the full KPI callout with thousands separators. Day 6 checks whether spend blew the budget. Day 7 categorises performance as on target, over target, or critical. By the end you have the raw pieces of the quarterly report you'll finish in Week 4.
"Email Blast — $1,250.00" with an f-stringstrip(), lower(), and replace()f"{spend:,.2f}""on target", "over target", or "critical" with if/elif/elseGoal: by Friday you can format one campaign row entirely in code.