Project: tip calculator
Build a tool people really use at restaurants: type the bill, pick a tip and see the total.
You'll combine an HTML form, a little CSS and JavaScript. Read numbers from inputs with Number(input.value), and round money with total.toFixed(2), which always shows two decimal places.
Test it yourself in the preview: change the bill, pick a tip and click Calculate.
Your tasks
0 of 5 done- Listen for clicks on the Calculate button
- A 50 bill with a 20% tip shows a total of 60
- It works for other amounts (80 with 15% is 92)
- The total is rounded to 2 decimal places
- Add a CSS rule that styles the button
Tutor
The tutor guides you toward the answer instead of handing it over. It uses your own Claude usage.
Nothing printed yet.
No problems found. Unclosed tags, missing semicolons and errors show up here in plain words.