Function in Python that calculates discount on a price
- Get link
- X
- Other Apps
def give_discount(fullprice, discountpc):
discount = discountpc / 100 * fullprice
askprice = fullprice - discount
print(f"The actual price is {fullprice}, discount is {discountpc} percent, you give only {askprice}. Thanks.")
fullprice = int(input("Enter the actual price of the product plz: "))
discount = float(input("What percentage of discount you want to give?: "))
give_discount(fullprice, discount)
Python
- Get link
- X
- Other Apps
Comments
Post a Comment
Write something to CodeWithAbdur!