Course Project Step: A Tip Calculator

Build a tip calculator. It needs a box for the bill, three tip buttons for 15, 18 and 20 percent marked with data attributes, and a box for a custom percentage. Clicking a tip button selects it and clears the custom box; typing a custom percentage clears the selected button. Show the tip and the total with two decimal places, updating the moment anything changes. Write one function that reads everything and draws the answer, and call it from every event.

YOUR TURN · WEB PAGE
Your turn → Work through it step by step. This is a piece of the course project, not a throwaway exercise.
loading editor…

Syntax has to be exact. Every quote, bracket, brace and parenthesis needs its partner, and every HTML tag you open needs closing. One slip and the script won't run; the message under the page will say where.

Built it in both languages?

Mark it done once your Python and JavaScript versions both run correctly. Honesty here is what makes the dashboard useful to you.

← BackNext: Module 28: Time →