Python Program to Find The Net Bill Amount After Discount

Program to calculate discount in python; Through this tutorial, you will learn how to calculate/find discount after net bill in python program.

Python program to calculate the final bill amount to be paid by a customer

Let’s follow the following algorithm to write a program to calculate discounts in python:

  • Take input net amount by using python input() function.
  • Calculate or find final bill amount to be paid by a customer using if elif else statement.
  • End of the program print the amount to be paid by a customer.
# input net amount
amt = int(input("Enter Amount: "))

# calculate amount with discount
if(amt>0):
    if amt<=5000:
       disc = amt*0.10
    elif amt<=15000:
        disc=amt*0.15
    elif amt<=25000:
        disc=0.20 * amt
    else:
         disc=0.5 * amt

    print("Discount Amount : ",disc)
    print("To be paid by Customer : ",amt-disc)
else:
    print("Invalid Amount")

Output

Enter Amount:  10000
Discount Amount :  1500.0
To be paid by Customer :  8500.0

Take Input amount from user by using python input() function and calculate the discount using the if elif else statement based on the input amount, and at the last of this program print the final net amount to be paid by customer.

Recommended Python Programs

AuthorDevendra Dode

Greetings, I'm Devendra Dode, a full-stack developer, entrepreneur, and the proud owner of Tutsmake.com. My passion lies in crafting informative tutorials and offering valuable tips to assist fellow developers on their coding journey. Within my content, I cover a spectrum of technologies, including PHP, Python, JavaScript, jQuery, Laravel, Livewire, CodeIgniter, Node.js, Express.js, Vue.js, Angular.js, React.js, MySQL, MongoDB, REST APIs, Windows, XAMPP, Linux, Ubuntu, Amazon AWS, Composer, SEO, WordPress, SSL, and Bootstrap. Whether you're starting out or looking for advanced examples, I provide step-by-step guides and practical demonstrations to make your learning experience seamless. Let's explore the diverse realms of coding together.

One reply to Python Program to Find The Net Bill Amount After Discount

  1. Really this website was awesome its very useful

Leave a Reply

Your email address will not be published. Required fields are marked *