Calculate discount amount python code
Read moreHow do you take a percent off a number in Python?
To calculate a percentage in Python, use the division operator (/) to get the quotient from two numbers and then multiply this quotient by 100 using the multiplication operator (*) to get the percentage.
Read moreHow do you calculate selling price in Python?
# Python Program to Calculate Profit or Loss actual_cost = float(input(” Please Enter the Actual Product Price: “)) sale_amount = float(input(” Please Enter the Sales Amount: “)) if(actual_cost – sale_amount > 0): amount = actual_cost – sale_amount print(“Total Loss Amount = {0}”.
Read more