Question: Question 3: Write a program that computes the cost of a long-distance call. The cost of the call is determined according to the following rate
Question 3:
Write a program that computes the cost of a long-distance call. The cost of the call is determined according to the following rate schedule:
Any call started between 8:00 A.M. and 6:00 P.M., Monday through Friday, is billed at a rate
of $0.40 per minute.
Any call starting before 8:00 A.M. or after 6:00 P.M., Monday through Friday, is charged at a
rate of $0.25 per minute.
Any call started on a Saturday or Sunday is charged at a rate of $0.15 per minute. The input will consist of the day of the week, the time the call started, and the length of the call in minutes. The output will be the cost of the call.
For example, an execution could look like this: Enter the day the call started at: Fri Enter the time the call started at (hhmm): 2350
Enter the duration of the call (in minutes): 22 This call will cost $5.5
And this is what i wrote:
day=input("Enter the day the call started at:") time=int(input("Enter the time the call started at (hhmm):")) duration=int(input("Enter the duration of the call (in minutes):")) if day == "Mon" or "Tue" or "Wed" or "Thr" or "Fri": print("This call will cost"+str(0.40*duration)) elif day == "Mon" or "Tue" or "Wed" or "Thr" or "Fri": print("This call will cost"+str(0.25*duration)) else: print("This call will cost"+str(0.15*duration))
please complete my coding, i am stucked.
please dont use def(week_time_duration) , thanks
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
