Question: (+5) Write a Python program that determines cell phone charges (see problem #1 in Lab 00 with the stipulation that the user can use their
(+5) Write a Python program that determines cell phone charges (see problem #1 in Lab 00 with the stipulation that the user can use their phone < 300 minutes. Recall that problem 1 in Lab 00 reads as follows:
Suppose your cell phone carrier charges you a monthly fee of $30.00 for up to 300 minutes and $0.45 for each additional minute after the first 300. Assuming you used your phone for x minutes with x > 300, the total monthly fee would be?
If you used your phone for <= 300 minutes then the charge is $30.00 Assume the user enters a positive value for the number of minutes
30 + (x -300) * .45 correct answer
Use the following template
A = 30 #CONSTANT fee for <= 300 minutes m = int(input("Enter the number of minutes ")) c = 0 # initialize cost variable if (m > 300): # minutes > 300 # calculations here to compute the solution # use the correct answer provided print(" the cost for ", m, " minutes is ", c ) else: # here m is <= 300 # s <= 0 print(" the cost for ", m, ' minutes is ', A )
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
