75.4k views
3 votes
(75 Points) Using Python, solve this problem.

(75 Points) Using Python, solve this problem.-example-1
User Boris Feld
by
7.9k points

1 Answer

3 votes

Answer:

def calculateBill(gb):

cost = 100.0

if (gb > 15):

cost += (gb-15)*100.0

return cost

for gb in [15.1, 14, 15.6, 18]:

print('{} GB costs ${:.2f}'.format(gb, calculateBill(gb)))

Step-by-step explanation:

I also added the example of 15.1 to the output.

User Lilshieste
by
7.9k points

No related questions found