Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- call_cost = float(input("Enter the cost of the call: "))
- outgoing_operator = input("Choose outgoing operator (operator1, operator2, or operator3): ")
- incoming_operator = input("Choose incoming operator (operator1, operator2, or operator3): ")
- cost_per_minute_operator1_outgoing = 0.2
- cost_per_minute_operator2_outgoing = 0.3
- cost_per_minute_operator3_outgoing = 0.4
- cost_per_minute_operator1_incoming = 0.05
- cost_per_minute_operator2_incoming = 0.06
- cost_per_minute_operator3_incoming = 0.07
- outgoing_cost_operator1 = cost_per_minute_operator1_outgoing * call_cost
- outgoing_cost_operator2 = cost_per_minute_operator2_outgoing * call_cost
- outgoing_cost_operator3 = cost_per_minute_operator3_outgoing * call_cost
- incoming_cost_operator1 = cost_per_minute_operator1_incoming * call_cost
- incoming_cost_operator2 = cost_per_minute_operator2_incoming * call_cost
- incoming_cost_operator3 = cost_per_minute_operator3_incoming * call_cost
- if outgoing_operator == "1":
- print(f"{outgoing_cost_operator1}")
- elif outgoing_operator == "2":
- print(f"{outgoing_cost_operator2}")
- elif outgoing_operator == "3":
- print(f"{outgoing_cost_operator3}")
- else:
- print("Error")
- if incoming_operator == "1":
- print(f"{incoming_cost_operator1}")
- elif incoming_operator == "2":
- print(f"{incoming_cost_operator2}")
- elif incoming_operator == "3":
- print(f"{incoming_cost_operator3}")
- else:
- print("Error")
- total_cost = (outgoing_cost_operator1 or outgoing_cost_operator2 or outgoing_cost_operator3) +\
- (incoming_cost_operator1 or incoming_cost_operator2 or incoming_cost_operator3)
- print(f"The total cost of the call is: {total_cost}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement