In algebra, a quadratic or 'square' equation is any equation that can be written as ,...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
In algebra, a quadratic or 'square' equation is any equation that can be written as , where x represents an unknown value while a, b, and c represent the known coefficients of the equation where a # 0. The solution of the quadratic equation is computed by the Bhaskara's formula (as follows) for a given a, b, and c coeficients. 1) a = 3, b = -2, c = -1 => x1 = 1 2) a = 2, b = 12, c = -4 => x1 = 1 In [] # Write your code here ax² +bx+c=0, and x2 = -1/3 and x2 = -7 x= -6± Write a Python program that reads the input a, b, and c from the user; calculates the unknown values (x), and display both. Use the following results to validate the correctness of your program: V 2a - 4ac Write a Python program that reads the radius (r) of a circle from the user and display the diameter, circumference, and area. For the computation, use the value 3.14159 for π and the following formulas diameter = 2r, circumference = 2πr and area = Tr2. Present the output in the following format The diameter of is = value The circumference is = value The area is = value In [ ] # Write your code here Some investment advisors say that it's reasonable to expect a 7% return over the long term in the stock market. Assuming that you begin with $1000 and leave your money invested, calculate and display how much money you'll have after 10, 20 and 30 years. Use the following formula for determining these amounts: a = p(1+r)^n where p is the original amount invested (i.e., the principal of $1000), r is the annual rate of return (7%), n is the number of years (10, 20 or 30) and a is the amount on deposit at the end of the nth year. In [ ] # Write your code here In algebra, a quadratic or 'square' equation is any equation that can be written as , where x represents an unknown value while a, b, and c represent the known coefficients of the equation where a # 0. The solution of the quadratic equation is computed by the Bhaskara's formula (as follows) for a given a, b, and c coeficients. 1) a = 3, b = -2, c = -1 => x1 = 1 2) a = 2, b = 12, c = -4 => x1 = 1 In [] # Write your code here ax² +bx+c=0, and x2 = -1/3 and x2 = -7 x= -6± Write a Python program that reads the input a, b, and c from the user; calculates the unknown values (x), and display both. Use the following results to validate the correctness of your program: V 2a - 4ac Write a Python program that reads the radius (r) of a circle from the user and display the diameter, circumference, and area. For the computation, use the value 3.14159 for π and the following formulas diameter = 2r, circumference = 2πr and area = Tr2. Present the output in the following format The diameter of is = value The circumference is = value The area is = value In [ ] # Write your code here Some investment advisors say that it's reasonable to expect a 7% return over the long term in the stock market. Assuming that you begin with $1000 and leave your money invested, calculate and display how much money you'll have after 10, 20 and 30 years. Use the following formula for determining these amounts: a = p(1+r)^n where p is the original amount invested (i.e., the principal of $1000), r is the annual rate of return (7%), n is the number of years (10, 20 or 30) and a is the amount on deposit at the end of the nth year. In [ ] # Write your code here
Expert Answer:
Answer rating: 100% (QA)
Certainly Heres a Python program that reads the input coefficients a b and c from the user calculates the unknown values x and displays the results python import math Read input coefficients a floatinputEnter coefficient a b floatinputEnter coefficient b c floatinputEnter coefficient c Calculate discriminant discriminant b 2 4ac Check if the equation has real roots if discriminant 0 Calculate the roots root1 b mathsqrtdiscriminant 2a root2 b mathsqrtdiscriminant 2a Display the roots printRoot 1 root1 printRoot 2 root2 else printThe quadratic equation has no real roots You can run this program and input the values of a b and c The program will then calculate ... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
Current assets $554,000 Debt investments (trading) 596,000 Common stock (par value $10) 455,000 Paid-in capital in excess of par 148,000 Retained earnings 800,000 Prepare the required journal entries...
-
What would you suggest to be done and which principles are important to you in this decision? How would you think about the greatest good in this case? As a leader what are your duties and who are...
-
Read the article " The Twitter Trap " by Bill Keller carefully. In this article, Keller uses his personal experiences to attract the audience and uses funny examples to help the audience understand...
-
A trader has a soft limit of $8MM USD and a hard limit of $10MM USD. Their current NOP is $3MM USD. They purchase $6MM USD, sell $1MM USD, and then purchase another $5MM USD. Which of the following...
-
Using the set axioms as examples write axioms for the list domain, including all the constants, functions, and predicates mentioned in the chapter.
-
Refer to P3-4. Kaylee James, a connoisseur of fine chocolate, opened Kaylee's Sweets in Collegetown on February 1. The shop specializes in a selection of gourmet chocolate candies and a line of...
-
Arco, Inc. is a small company that installs and repairs home and commercial heating and air-conditioning units. It has 75 employees and recently started selling its stock to extended family, its...
-
Mrs. Meadows sells two popular brands of cookies, Chip Dip and Soft Chunk Chocolate Chip. Both cookies go through the mixing and baking departments, but Chip Dip is also dipped in chocolate in the...
-
All work must be shown on every facet of the solution. This includes a timeline with cashflows, timing and rates clearly laid out and formulas (in pure form, not in the calculator or excel form). A...
-
In July 2006, Tata Motors, an Indian auto maker, and Fiat Auto, an Italian automaker, announced their intention to form a joint venture to produce passenger cars, engines, and transmissions in India....
-
Diane wants to receive annuity payments of $2500 at the beginning of each quarter for eight years. The annuity term is to start four years from now and interest is 6% compounded quarterly. a) How...
-
Describe the way in which innovation is reflected in organizations, and distinguish between open and closed innovation.
-
Why is it important to carry out an assessment of training needs before setting training objectives?
-
Assess the signifcance of the work ethic in contemporary society.
-
Comment on generational differences in work values.
-
What is the signifcance of diversity in relation to the effectiveness of teams?
-
Relatively speaking, the thickness of Earth?s atmosphere is incredibly small compared to Earth?s radius (REarth = 6.37 ? 106 m). Consider that there is no physical boundary between Earth and space,...
-
Use a calculator to evaluate the expression. Round your result to the nearest thousandth. V (32 + #)
-
Perform the operation and write the result in standard form. 1. 2 / 1 + I - 3/1-i 2. 2i/2 + I + 5/2-i 3. i/3-2i + 2i/3 + 8i
-
Find the exponential model y = aebx that fits the points (0, 2) and (4, 3).
-
Find the determinant of the matrix. Expand by cofactors using the row or column that appears to make the computations easiest. 1. 2. 3. 4. 8 -3 -1 3 -6 3. 1 -1 -1 4 11 5
-
What is an antigen?
-
Why is a single innate immune cell able to respond to many different pathogens?
-
Explain what happens when a B cell first encounters a pathogen and binds to an antigen on the pathogen.
Study smarter with the SolutionInn App