Display the solution according to the aforementioned formula

Assignment Help Python Programming
Reference no: EM132355402

Question

1 You need help to write this programe in python ...#The roots (solutions) to the quadratic equation

ax2 +bx+c = 0 is given by the well-known formula

x = 2a

-b ± √b -4ac

2 Write a program that takes the three coefficients a, b, and c as input, computes and displays the solutions according to the aforementioned formula. Note the ± in the numerator means there are two answers. But this will not apply if a is zero, so that condition must be checked separately; design your program such that:

1. If a = 0 and b = 0 and c = 0, it prints "solution is indeterminate!".

2. If a = 0 and b = 0 but c =/ 0 ,it prints "there is no solution".

3. If a = 0 but b =/ 0 and c =/ 0 , it prints "equation is linear", computes the solution as x = -c/b and display it.

The above formula also fails to work (for real numbers) if the expression under the square root is negative. That expression b ac is called the discriminant of the 2 - 4 quadratic. Define that as a separate variable d and check its sign:

1. If d > 0 then there are two real roots given by the formula above.

2. If d = 0 then the roots are loaded and equal to -b/2a.

3. If d < 0 then there is no real solution (roots are complex numbers).

Reference no: EM132355402

Questions Cloud

Display a warning if the number is less than 2 or greater : Display a warning if the number is less than 2 or greater than 10 and prompt the user to enter the data again until they enter a valid number.
Why is it so important to the american legal system : What is "stare decisis" and why is it so important to the American legal system? Why must business managers pay attention to changes in the law?
Hr problems involving the expatriate issues in compensation : What are some HR problems involving the Expatriate Issues in Compensation that might be influenced by one of the Hofstede dimensions of national culture?
Create your own function that illustrates a feature : Create your own function that illustrates a feature that you learned in this unit. The function must take at least one argument.
Display the solution according to the aforementioned formula : Write a program that takes the three coefficients a, b, and c as input, computes and displays the solutions according to the aforementioned formula.
How should a health care leader interface with local : How should a health care leader interface with local, state, or nationally elected officials to dialogue concerning local health care challenges?
Promotional activities to new employees : Could you please help me explain on how to advising on promotional activities to new employees?
You love art. and you know that the children also love art : You love art. And you know that the children also love art. One day, you decide to bring out cutouts for children to decorate. The parents come to pick up
Embark on a diversification strategy : As the CEO, you have decided to embark on a diversification strategy and have located a potential candidate to acquire and need to execute a complete

Reviews

Write a Review

Python Programming Questions & Answers

  Cleint software so that it does not display

Rewrite the cleint software so that it does not display an echo of a message sent by the users. Maybe it means that each time a user tries to send a private message that same message is also sent back to them? summary: stop that from happening?

  Write a python program that prints out a table

Write a Python program that prints out a table of values of all even powers of 2 from 2**0 through 2**32. For each value, print the value in decimal, hexadecimal, and binary.

  Create a sub class to the question hierarchy of section

Create a sub class MultiChoice Question to the question hierarchy of Section 10.1 that allows multiple correct choices. The respondent should provide.

  Implement the ransac algorithm for linear regression

You must find the observed data, threshold, also the outliers and remove them from (X,y) How exactly do i do this? please provide the code.

  Grade that will calculate and return a student''s exam

Write a function overall Grade that will calculate and return a student's 2316 exam average. It will accept five parameters, which correspond to exam1,2,3,4 and the Final grade. It should replace the lowest exam grade with the 2nd lowest exam grade

  Write program that asks the user to input a set of floating

Write program that asks the user to input a set of floating-point values. When the user enters a value that is not a number, give the user a second chance.

  Display all of the scores entered and the total score

Ask the user in between each score if they want to continue (y/n). Display all of the scores entered and the total score at the end.

  Display the count of the groups and final balance

Using the For.. loop, Write a program to ask the user for 7 deposits. As the user enters a deposit amount, update the balance using accumulation concept.

  Write the program that reads from a text file

Write the program that reads from a text file. Read each line and send it to the output file, preceded by line numbers. Whose fleece was white as snow.

  What will be displayed after the code runs

Assuming the random module has been imported into its default namespace, which of the following could be used to generate a random even integer.

  Write a program that prompts the cashier to enter all sales

A supermarket wants to reward its best customer of each day, showing the customer's name on a screen in the supermarket.

  Write a program to determine the coefficients of expanded

Write a program to determine the coefficients of expanded form of (aX+bY+c)n. Every line in bold is questions to ask whoever runs the program to enter values or commands (y or n) at the console.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd