Computer Science, asked by arjun2006sep, 1 month ago

Write a program to computerize the billing operation of a telephone of a telephone company. The bill has to be generated based on the following conditions:

Number of calls                    Amount per call

First 50 calls                            free

Next 100 calls                            50 Paisa per call

Next 200 calls                            80 Paisa per call

Rest of the calls                            Rs 1.20 per call

 

A rent of Rs 120 is charged from every customer. A tax of 15% is charged on the sum of charges and rent. The total amount is tax added to the sum of charges and rent .Print the bill for a customer.​

Answers

Answered by Equestriadash
2

The following co‎des have been written using Python.

while True:

   nc = int(input("Enter the number of calls: "))

   print()

   cc = 0

   if nc <= 50:

       cc = nc*0

   elif nc <= 100:

       cc = nc*0.50

   elif nc <= 200:

       cc = nc*0.80

   elif nc > 200:

       cc = nc*1.20

   print(cc, "is the cost.")

   print("A rent of 120 and a tax of 15% will be charged.")

   print()

   cc = cc + 120

   cc = ((cc*15)/100) + cc

   print(cc, "is your total cost [cost + rent + tax].")

   print()

   c = input("Next customer? [Y/N]: ")

   if c in "Yy":

       continue

   else:

       break

Similar questions