Answer:
# 30 + (x -300) * .45ç correct answer
A = 30 #CONSTANT fee for <= 300 minutes
m = int(input("Enter the number of minutes "))
c = 0 # initialize cost variable
if (m>300):
c = 30 + ((m - 300) * 0.45) #Cost when the minute is greater 300
print("The cost for ", m, " minutes is $",c )
else:
print("The cost for ", m, " minutes is $",A )
Step-by-step explanation:
c = 30 + ((m - 300) * 0.45) #Cost when the minute is greater 300
First 300 is subracted from the given minute to get the extra minute, and then the extra minute is multiplied by $0.45 after which it is added to the constant of $30 for the 300 minutes