Question

In: Computer Science

Write a python program that will take in the number of call minutes used. Your program...

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.

Solutions

Expert Solution

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:


Related Solutions

USING PYTHON Write a program to create a number list. It will call a function to...
USING PYTHON Write a program to create a number list. It will call a function to calculate the average values in the list. Define main ():                        Declare variables and initialize them                        Create a list containing numbers (int/float)                        Call get_avg function that will return the calculated average values in the list.                                       Use a for loop to loop through the values in the list and calculate avg                        End main()
Write a program that accepts a number of minutes and converts it both to hours and...
Write a program that accepts a number of minutes and converts it both to hours and days. For example, 6000 minutes is 100.0 hours or 4.166666666666667 days. (I currently have what is below) import java.util.Scanner; public class MinutesConversion { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int numOfMinutes = sc.nextInt(); double hour = numOfMinutes/60.00; double days = (hour/24); System.out.println(numOfMinutes + " minutes is " + hour + " hours or " + days + " days.");...
Write a program that accepts a number of minutes and converts it to days and hours....
Write a program that accepts a number of minutes and converts it to days and hours. For example, 6000 minutes represents 4 days and 4 hours. Be sure to provide proper exception handling for non-numeric values and for negative values. Save the file as  MinuteConversionWithExceptionHandling.java
PART A Write a program that converts a total number of seconds to hours, minutes, and...
PART A Write a program that converts a total number of seconds to hours, minutes, and seconds. It should do the following: Prompt the user for input Read an integer from the keyboard Calculate the result Use printf to display the output Your output must be of the format: totalSeconds seconds = numHours hours, numMinutes minutes, and numSeconds seconds For example: If the user entered: 5000 Your program would output: 5000 seconds = 1 hours, 23 minutes, and 20 seconds...
Python program. Write a python program that can convert any radix-d (arbitrary base) number to the...
Python program. Write a python program that can convert any radix-d (arbitrary base) number to the equivalent radix-e (another arbitrary base) number. Where e and d are members in [2, 16]. Remember, base 16 needs to be calculated as hexadecimal. So, if radix-d is input as a hexadecimal number, it needs to convert and output to desired base. Conversely, if base 16 is the desired output, then the output needs to show a hexadecimal number. Hints: The easiest approach is...
PYTHON WHILE Write a program that prompts for and reads the number ? of spheres to...
PYTHON WHILE Write a program that prompts for and reads the number ? of spheres to be processed. If ?≤0 your program must display an error message and terminate; otherwise it does the following for ? times: Write a program that prompts for and reads the number ?n of spheres to be processed. If ?≤0n≤0 your program must display an error message and terminate; otherwise it does the following for ?n times: Prompts for and reads the volume of a...
write a program in python that insert a number in the middle of an array. Assume...
write a program in python that insert a number in the middle of an array. Assume that the length of an array is even. For instance, is a=(1,4,7,9) and num=100, then really=(1,4,100,7,9)
Please write in beginner level PYTHON code! Your job is to write a Python program that...
Please write in beginner level PYTHON code! Your job is to write a Python program that asks the user to make one of two choices: destruct or construct. - If the user chooses to destruct, prompt them for an alternade, and then output the 2 words from that alternade. - If the user chooses construct, prompt them for 2 words, and then output the alternade that would have produced those words. - You must enforce that the users enter real...
Python 3 Write the definition of a function that take one number, that represents a temperature...
Python 3 Write the definition of a function that take one number, that represents a temperature in Fahrenheit and prints the equivalent temperature in degrees Celsius. Write the definition of another function that takes one number, that represents speed in miles/hour and prints the equivalent speed in meters/second. Write the definition of a function named main. It takes no input, hence empty parenthesis, and does the following: - prints Enter 1 to convert Fahrenheit temperature to Celsius - prints on...
Write a program in Python to determine how many months it will take to pay off...
Write a program in Python to determine how many months it will take to pay off a $10,000 car loan with 4% interest. Choose your own monthly payment.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT