Skip to content

Python Contribution #2492

@realeesh17

Description

@realeesh17

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions