Name Due Date Assignment Solutions to the quadratic equation Ax +Bx + C = 0 may...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Name Due Date Assignment Solutions to the quadratic equation Ax² +Bx + C = 0 may be calculated using the quadratic formulas: x = -B+B2-4AC 2A -B-√√B²-4AC 2A These formulas may be used, of course, only if the leading coefficient, A, is not zero. The number and type of solutions is determined by the value of the expression under the radical sign, B2-4AC, known as the discriminant: value of discriminant number of solutions kind of solutions positive 2 real zero 1 negative 2 real imaginary Your job is to write a program which will read the coefficients of a quadratic equation and, if the leading coefficient is non-zero, calculate and report the solutions. Since programming languages does not provide the imaginary type, you'll have to take appropriate steps to give imaginary results in the form shown. Just remember that every imaginary number is really determined by a pair of real numbers. Several sample runs appear on the next page; user input appears in bold type. The "*I" which appears in the output is simply written where necessary; the actual calculations involve only real results. You are not required to duplicate this output, but you should provide all information shown. Page 2 Your output, for running the program several times, may appear something like this. John Smith This program will provide solutions for an equation of the form A*x^2 + B*x + C = 0, where A, B and C are integers, and A is not equal to zero. Enter A, B and C 2 -5 -3 The two real solutions are and x = 3.0000E+00 x = -5.0000E-01 Press ENTER to terminate. John Smith This program will provide solutions for an equation of the form A*x^2 + B*x + C = 0, where A, B and C are integers, and A is not equal to zero. Enter A, B and C 2 -5 4 The two imaginary solutions are x = and x = 1.2500E+00 1.2500E+00 Press ENTER to terminate +(6.6144E-01) *I (6:6144E-01) *I John Smith - This program will provide solutions for an equation of the form A*x^2 + B*x + C = 0, where A, B and C are integers, and A is not equal to zero. Enter A, B and C 1 -8 16 The one real solution is Press ENTER to terminate John Smith x = 4.0000E+00 This program will provide solutions for an equation of the form A*x^2 + B*x + C = 0, where A, B and C are integers, and A is not equal to zero. Enter A, B and C 038 No solutions will be calculated for a leading coefficient of 0! Press ENTER to terminate. Name Due Date Assignment Solutions to the quadratic equation Ax² +Bx + C = 0 may be calculated using the quadratic formulas: x = -B+B2-4AC 2A -B-√√B²-4AC 2A These formulas may be used, of course, only if the leading coefficient, A, is not zero. The number and type of solutions is determined by the value of the expression under the radical sign, B2-4AC, known as the discriminant: value of discriminant number of solutions kind of solutions positive 2 real zero 1 negative 2 real imaginary Your job is to write a program which will read the coefficients of a quadratic equation and, if the leading coefficient is non-zero, calculate and report the solutions. Since programming languages does not provide the imaginary type, you'll have to take appropriate steps to give imaginary results in the form shown. Just remember that every imaginary number is really determined by a pair of real numbers. Several sample runs appear on the next page; user input appears in bold type. The "*I" which appears in the output is simply written where necessary; the actual calculations involve only real results. You are not required to duplicate this output, but you should provide all information shown. Page 2 Your output, for running the program several times, may appear something like this. John Smith This program will provide solutions for an equation of the form A*x^2 + B*x + C = 0, where A, B and C are integers, and A is not equal to zero. Enter A, B and C 2 -5 -3 The two real solutions are and x = 3.0000E+00 x = -5.0000E-01 Press ENTER to terminate. John Smith This program will provide solutions for an equation of the form A*x^2 + B*x + C = 0, where A, B and C are integers, and A is not equal to zero. Enter A, B and C 2 -5 4 The two imaginary solutions are x = and x = 1.2500E+00 1.2500E+00 Press ENTER to terminate +(6.6144E-01) *I (6:6144E-01) *I John Smith - This program will provide solutions for an equation of the form A*x^2 + B*x + C = 0, where A, B and C are integers, and A is not equal to zero. Enter A, B and C 1 -8 16 The one real solution is Press ENTER to terminate John Smith x = 4.0000E+00 This program will provide solutions for an equation of the form A*x^2 + B*x + C = 0, where A, B and C are integers, and A is not equal to zero. Enter A, B and C 038 No solutions will be calculated for a leading coefficient of 0! Press ENTER to terminate.
Expert Answer:
Answer rating: 100% (QA)
Sure I can help you with that Heres a Python program that reads the coefficients of a quadratic equa... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
A company's average collection period is 30 days and its average payment period is 45 days. If its annual sales are $1,000,000, what is the company's net working capital?
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
What are the essential differences between victim and annex caches?
-
Determine 0!, 1!, 3!, and 4!.
-
Consider a capacitive divider shown in Figure 6.15. For an \(\mathrm{AC}\) input \(v_{\mathrm{i}}\), prove that the output voltage of the capacitive voltage divider is...
-
Jason and the toddler present a classic legal puzzle: What, if anything, must a bystander do when he sees someone in danger? We will examine this issue to see how the common law works. The common law...
-
Fibertek, Inc., computed a pretax financial income of $40,000 for the first year of its operations ended December 31, 2011. Included in financial income was $25,000 of nondeductible expenses, $22,000...
-
(1). SDJ, Inc., has net working capital of $3,870, current liabilities of $5,800, and inventory of $5,040. a. What is the current ratio? (Do not round intermediate calculations. Round your answer...
-
A storage tank is connected to a pond (at atmospheric pressure!) by a length of 3-in pipe and two gate valves. From previous operating experience, it has been found that when the tank is at a...
-
The account numbers, balances, and transactions to be recorded are at the top of the attached document. Essentially what is required is to complete the accounting process.. Journal Page 1 Date...
-
John gathered the following information about the cost driver volume for each product: Activity (cost driver) Machine setups (setup hours) Diomycin 200 Homycin 600 Addolin 800 Plant management...
-
Explain the importance of wearing protective clothing and other appropriate safety equipment (PPE) during the monitoring activities
-
which of these sources can affect ones marketing strategy; economic forces, sociocultural forces, legal and regulatory forces, competitive forces, political forces, and technological forces?
-
Ethical decision making and strategic management in the 21st century is important for the long- term sustainability of any organisation. Leaders play a big role when ensuring ethical strategic...
-
Bed & Bath, a retailing company, has two departmentsHardware and Linens. The companys most recent monthly contribution format income statement follows: Total Department Hardware Linens Sales $...
-
This information relates to the Cash account in the ledger of Cullumber Company. Balance September 1-$20,340; Cash deposited-$64,000 Balance September 30-$21,540; Checks written-$62,800 The September...
-
You are standing on the top of a building and throw a ball vertically upward. After 2 seconds, the ball passes you on the way down, and 2 seconds after that, it hits the ground below. a. What is the...
-
In 2012, Gale and Cathy Alexander hosted an exchange student, Axel Muller, for 9 months. Axel was part of International Student Exchange Programs (a qualified organization). Axel attended tenth grade...
-
Dr. George E. Beeper is a single taxpayer. He lives at 45 Mountain View Dr., Apt. 321, Spokane, WA 99210. Dr. Beeper's Social Security number is 775-88-9531. Dr. Beeper works for the Pine Medical...
-
Ann hires a nanny to watch her two children while she works at a local hospital. She pays the 19-year-old nanny $125 per week for 48 weeks during the current year. a. What is the employer's portion...
-
Graph the following on the number line: 1. 1 2. 4 3. 3
-
Determine which of -6 and 4 is larger using a number line, and express that using both the greater than and the less than notations.
-
Determine which of 27 and 410 is larger, and express that using both the greater than and the less than notations.
Study smarter with the SolutionInn App