id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

gaurav1780@gmail.com 01_variables_and_operators > total_cost
prev  |  next  |  chance

Define a function that when passed three integers - the first representing the fixed cost (one-time cost) of a business, the second representing the variable cost (monthly expenses), and the third representing the number of months the business has operated - returns the total cost of business so far.


total_cost(10, 5, 6) → 40
total_cost(1000, 900, 10) → 10000
total_cost(1, 0, 5000) → 1

...Save, Compile, Run (ctrl-enter)

def total_cost(fixed_cost, variable_cost, n_months):

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Python Help

Difficulty: 1 Post-solution available

Copyright Nick Parlante 2017 - privacy