Functions Business#
Business Application#
Question-1: Simple Interest#
Write a function that takes the principal amount, annual interest rate, and time period in years as parameters and returns the interest amount and final amount as a tuple.
The annual interest rate is in decimal form.
Question-2: Cost#
Total cost (C) has two parts:
Variable Costs: Expense that changes in proportion to number of items produced.
Variable Cost = Number of items produced \(\cdot\) Cost of producing one item
Fixed Costs: Does not depend on the number of the items produced.
Examples: rent, lease costs, salaries, utility bills, insurance
It costs a company 80 dollars to produce one item, and the company has fixed costs of 850 dollars and \(n\) represents the number of items produced.
Write a function which has the paramter \(n\) and returns the total cost.
Find the cost of producing 6 items.
Question-3: Linear Depreciation#
The value of a new machine is \(100,000\) dollars and its values is depreciated by \(7500\) dollars per year.
Write a function which has only one parameter \(t\) that represents the year and returns the value of the machine after \(t\) years.
Find the value of the machine after 6 years.
Question-4: Exponential Depreciation#
The value \(V\) of a truck in dollars is given by the formula \(140000(1.35)^{-0.6t}\) where \(t\) is the age of the truck in years.
Write a function which has only one parameter \(t\) that represents the year and returns the value of the truck after \(t\) years.
Find the value of the truck after 6 years.
Question-5: Plumber Charge#
A plumber charges a fixed fee of 150 dollars if the working time does not exceed 2 hours. If it exceeds 2 hours, he charges an extra 80 dollars for each additional hour. Write a function that takes one parameter, hours, and calculates the total cost based on the hours provided.
Question-6: Monthly Plan#
A gym company offers two plans: Basic and Professional. The details for each plan are as follows:
Basic Plan:
Fixed fee: 5 dollars
Cost per hour: 5 cents
Professional Plan:
Fixed fee: 10 dollars
Cost per hour: 6 cents
Write a function that takes two parameters, plan (either “Basic” or “Professional”) and hours, and calculates the total cost based on the plan and hours provided.