easy +8 pts

Tip Calculator

Given the bill amount and desired tip percentage, compute the total to pay including the tip.

You need to implement a function `calculate_total(bill, tip_percent)` that takes the bill amount before tip and the tip percentage (e.g., 15 for 15%) and returns the total amount to pay after adding the tip. - `bill` is a float or int (non-negative). - `tip_percent` is a float or int (non-negative). - The total is calculated as `bill + (bill * tip_percent / 100)`. - The result should be rounded to two decimal places, because money is usually displayed with cents. Use Python's built-in `round(value, 2)` to round to two decimal places. For example: if the bill is $50 and the tip is 15%, the total is `50 + 50*15/100 = 57.5`, which rounded to two decimals is `57.5`.

Constraints

- 0 ≤ bill ≤ 10^6 - 0 ≤ tip_percent ≤ 1000 - Inputs are numeric (int or float).

Example

```python
>>> calculate_total(50, 15)
57.5
>>> calculate_total(10, 20)
12.0
>>> calculate_total(0, 10)
0.0
```
8 points ~10 min

Recent Submissions

No submissions yet — hit Run Tests to try!

Hints

Use the formula: total = bill * (1 + tip_percent / 100).
Remember to round the final total to two decimal places with `round(total, 2)`.
Think about what happens with zero bill or zero tip percentage—both return zero and are valid.
Python 3
All tests passed!
Test Results
Press Ctrl+Enter or click Run Tests to execute your code.