The situation
Kiprono runs "Kiprono's Cyber Café", a made-up shop in Kitale that does printing, typing and online applications. He has no website and keeps his daily sales on scraps of paper. You will build him two small things: a one-page web page and a short Python script that adds up a day's sales. Both are small first projects for your coding portfolio.
Note: Use made-up details only. Do not put real phone numbers, emails, passwords or home addresses in your page or code. Write "07XX XXX XXX" for the contact line.
What you will produce
- Web page (HTML and a little CSS) with:
- a heading and a 2–3 sentence description,
- a list of at least three services with example prices in KES,
- at least one CSS colour change,
- a contact line with a made-up number.
- Python script that:
- stores at least five sales (name of service and amount in KES) in a list,
- uses a loop to print each sale and a running total,
- uses an
ifto print a message when the total is above an amount you choose, - uses at least one function (for example
day_total(sales)).
- Short explanation – 80–120 words: what each part does, one mistake you hit while testing and how you fixed it.
Steps
- Re-read the lessons on variables, conditions, loops, functions, debugging and your first web page.
- Write plain-English pseudocode for the script first (3–6 lines).
- Build the web page in a free online editor such as CodePen and look at it on your phone.
- Write the script in a free online Python editor and test it with two different lists of sales.
- Deliberately break one line, read the error message, then fix it.
- Write your explanation.
What to submit
- Your HTML/CSS and your Python code pasted in the text box, and/or a CodePen or GitHub link (public) for the web page.
- A screenshot (PNG or JPG, max 5 MB) of the page or of the script output is welcome.
- Your short explanation in the text box.
Tips
- Indent Python code carefully; one wrong space can cause an error.
- Use clear names like
totalandsales, notxandy. - Test with a small list first.
SKOPE