myfileagent-python-ci/pipeline/head This commit looks good
5 lines
147 B
Python
5 lines
147 B
Python
def total_price(unit_price, quantity):
|
|
if quantity < 1:
|
|
raise ValueError("Quantity must be positive")
|
|
return unit_price * quantity
|