Write a Python program to calculate the revenue from a sale based on the unit price and quantity of a product input by the user
- برمجة بايثون
- 2021-12-12
- softwareEngineer
الأجوبة
unitprice=int(input("Enter unit price:"))
quantity=int(input("Enter quantity:"))
if quantity>=100 and quantity<=120:
TotalPrice=float(unitprice*quantity*0.9)
elif quantity>120:
TotalPrice=float(unitprice*quantity*0.85)
else:
TotalPrice=float(unitprice*quantity)
print("The revenue from sale: ",TotalPrice,"$")أسئلة مشابهة
القوائم الدراسية التي ينتمي لها السؤال