In: Computer Science
Write a python program that will take in the number of call minutes used. Your program will calculate the amount of charge for the first 200 minutes with a rate of $0.25; the remaining minutes with a rate of $0.35. The tax amount is calculated as 13% on top of the total. The customer could have a credit that also has to be considered in the calculation process. Finally, the program displays all this information. Below is a sample run:
Customer account number: 12345
Minutes used: (you provide)
Charge for the first 200 minutes@ 0.25: (you provide)
Charge for the remaining minutes@ 0.35: (you provide)
Taxes: (you provide)
Credits: (you provide)
Total bill: (you provide)
please provide .py program file screenshot and output.
Python code:
#accepting account number
acc_no=input("Customer account number: ")
#accepting Minutes used
min_used=int(input("Minutes used: "))
#checking if Minutes used is less than or equal to 200
if(min_used<=200):
#finding charge for first 200 Minutes
charge_200=min_used*0.25
#finding charge for remaining Minutes
charge_rem=0
else:
#finding charge for first 200 Minutes
charge_200=200*0.25
#finding charge for remaining Minutes
charge_rem=(min_used-200)*0.35
#finding total amount
total=charge_200+charge_rem
#finding tax amount
tax=total*13/100
#printing amount for first 200 minutes
print("Charge for the first 200 minutes@ 0.25:",charge_200)
#printing amount for remaining minutes
print("Charge for the remaining minutes@ 0.35:",charge_rem)
#printing amount of Taxes
print("Taxes: {:.1f}".format(tax))
#asking for credit amount
credit=int(input("Credits: "))
#printing the Total bill
print("Total bill: {:.1f}".format(total+tax+credit))
Screenshot:
Input and Output: