Hey! So my teacher gave us an exercise to do at home.
So this is the exercise:
A. will ask the user to enter the starting value of a product B. will ask the user to enter the discount rate
C. will calculate and display the discount rate with the appropriate message D. will calculate and display the final price (after the discount)
If you enjoy my content, liking the related posts and leaving +rep on my profile is always appreciated.
Please view my profile, and verify current contact information prior to contacting me offsite.
I contribute to this community for educational, entertainment and research purposes only, therefore I do not claim or hold responsibility for others actions.
If you enjoy my content, liking the related posts and leaving +rep on my profile is always appreciated.
Please view my profile, and verify current contact information prior to contacting me offsite.
I contribute to this community for educational, entertainment and research purposes only, therefore I do not claim or hold responsibility for others actions.
22 September, 2019 - 07:53 PM(This post was last modified: 22 September, 2019 - 07:55 PM by xMoses.)
Reply
Code:
bill = int(input("Enter bill amount:"))
discount = int(input("Enter discount percentage:"))
output = bill - (bill * discount / 100)
print("After discount your bill is: ", output)
(22 September, 2019 - 07:53 PM)xMoses Wrote: Show More
Code:
bill = int(input("Enter bill amount:"))
discount = int(input("Enter discount percentage:"))
output = bill - (bill * discount / 100)
print("After discount your bill is: ", output)