Question: Write a Python program called revenue.py to compute and display the revenue r given by the following expression: r = ax^2 + bx + c
Write a Python program called revenue.py to compute and display the revenue r given by the following expression: r = ax^2 + bx + c The input to the program must be a string such as a = 0.7, b=2, c =1200, x =1000 which specifies that the values of a, b, c, and x are 0.7, 2, 1200 and 1000 respectively. Note the following: The format of the input string is a comma separated list of name-value pairs with an equal sign between each name (i.e. a, b, c or x) and their corresponding values. The program must work correctly irrespective of the number of blank spaces that may precede or follow the equal signs or the commas.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
