geekcomputers / geekcomputers/Python
Python Contribution
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 35.4k
- Forks
- 12.9k
- Avg merge
- 2h 37m
- Merged PRs (30d)
- 1
Description
Incorrect Output in calculate_total Function
Description:I have encountered an issue in the calculate_total() function in the billing.py file. When I provide input with a list of prices, the total calculated is incorrect. The function does not seem to handle decimal values correctly.
from billing import calculate_total
prices = [12.99, 5.49, 8.75]
total = calculate_total(prices)
print(total)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open billing.py and inspect calculate_total first. Reproduce the issue with the price list shown in the report, then verify that decimal-valued prices produce the correct total. Done means the example no longer returns an incorrect result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100