Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

(IN PSEUDOCODE PLEASE) Create PSEUDOCODE for a program for Stumpy\'s Cell Phone

ID: 3794425 • Letter: #

Question

(IN PSEUDOCODE PLEASE)

Create PSEUDOCODE for a program for Stumpy's Cell Phone Company that accepts the number of text messages for a customer for one month and displays the bill for text messages.

If the user enters a negative number the program should display an error message.

If the user enters number greater than or equal to 0 your program should call a function that given the number of text messages, returns the amount to be charged. The program will then display a message stating the amount of the monthly bill for text messages.

Stumpy's charges customers a basic rate of $5 per month for their text message service. Additional rates are as follows:

The first 60 messages per month, regardless of message length, are included in the basic bill.

An additional five cents is charged for each text message after the 60th message, up to and including 180 messages.

An additional 10 cents is charged for each text message after the 180th message.

Federal, state, and local taxes add a total of 12 percent to each bill.

Explanation / Answer

Psuedo code:

def total_bill(no_of_txt_msgs):
   bill = 0;
   if(n <= 60):
       bill = bill + 5;
   else if(n > 60 and n <= 180):
       bill = 5 + (n-60)*0.05
   else if(n>180):
       bill = 5 + (180-60)*0.05 + (n-180)*0.1
   bill = bill + (bill*0.12) // add taxes
   return bill


while(True):
   print "Please Enter a number!"
   n = input()
   if(n<0):
       print "Sorry you have Entered negative number"
   else if(n>0):
       print "Bill for n messeges is ", total_bill(n)