Take the linear demand curve P = 100 – 2Qd, where P is the price of the good and Qd is the quantity demand.

computer science

Description

1.       Take the linear demand curve P = 100 – 2Qd, where P is the price of the good and Qd is the quantity demand. For two prices/quantities the midpoint formula for determining the price elasticity of demand is givkl;len by , where the top part is the average percent change in quantities and the bottom is average percent change in prices, for two pairs of prices and quantities. Write a function that inputs two prices, and then calculates the elasticity. Note that prices can’t less than or equal to 0 or greater than 100 and if prices are input below or above this range, the function should a print command stating the values are out of range and then end.

 

 

2.       Write a function that inputs a list of numbers and a percentile value from 0 to 1 and have the function return the element that is at that percentile (or greater than). You can use this website for the steps https://www.indeed.com/career-advice/career-development/how-to-calculate-percentile check out the step for “Follow these steps to calculate the kth percentile”

DON’T USE NUMPY


Related Questions in computer science category