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
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...
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...
Write a program IN PYTHON of the JUPYTER NOOTBOOK Write a Python program that gets a...
Write a program IN PYTHON of the JUPYTER NOOTBOOK Write a Python program that gets a numeric grade (on a scale of 0-100) from the user and convert it to a letter grade based on the following table. A: 90% - 100% B 80% - 89% C 70% - 79% D 60% - 69% F <60% The program should be written so that if the user entered either a non-numeric input or a numeric input out of the 0-100 range,...
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...
In Python, your program will read in a number (no need to prompt the user), and...
In Python, your program will read in a number (no need to prompt the user), and then reads in that number of lines from the terminal. Then the program should print an array of strings formatted in a nice regular box. So if the user inputs this: 5 Grim visaged war has smooth’d his wrinkled front And now, instead of mounting barded steeds To fright the souls of fearful adversaries He capers nimbly in a lady’s chamber To the lascivious...
Write a Python program that has a loop to continuously ask the user for a number,...
Write a Python program that has a loop to continuously ask the user for a number, terminating the loop when the number entered is -1. Inside the loop, 1.) display one asterisk(*) if the number is 1, 2.) two asterisk(**) if the number is 2 and 3.) "OTHER" if the number is any other number.
CODE IN PYTHON 1. Write a program that asks the user for the number of slices...
CODE IN PYTHON 1. Write a program that asks the user for the number of slices of pizza they want to order and displays the total number of dollar bills they owe given pizza costs 3 dollars a slice.  Note: You may print the value an integer value. 2. Assume that y, a and b have already been defined, display the value of x: x =   ya+b    3. The variable start_tees refers to the number of UD T-shirts at the start...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT