Saved Bookmarks
| 1. |
Write a program to computerize the billing operation of a telephone company:The bill has to be generated based on the following conditions:Number of callsFirst 50.callsAmount per callfreeNext 100 calls50 paise per callNext 200 calls80 paise per callRest of the calls*1.20 per callA rent of Rs.150 is charged is charged from every customer. A tax of 15% is charged onthe sum of charges and rent.The total amount is tax added to the sum of charges and rent. Print the bill for a customer. |
|
Answer» The following codes have been written using Python. while True: c = int(INPUT("Enter the number of calls: ")) print() if c <= 50: a = 0 elif c <= 100: a = 0.50*c elif c <= 200: a = 0.80*c elif c > 200: a = 1.20*c print(a, "is your cost.") print("A RENT of Rs 150 and a tax of 15% will be charged.") a = a + 150 a = a + (a*0.15) print() print(a, "is your total cost.") print() ch = input("NEXT CUSTOMER? [Y/N]: ") if ch in "Nn": break |
|