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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started