develop a flow chart and pseudocode for the problem below and show the steps and explain each lines Problem Statement. T
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
develop a flow chart and pseudocode for the problem below and show the steps and explain each lines Problem Statement. T
Statement. The roots of a quadratic equation ar²+bx+c = 0 can be determined with the quadratic formula, - b ± √b² - 4ac 2a X₁ X₂ Develop an algorithm that does the following: Step 1: Prompts the user for the coefficients, a, b, and c Step 2: Implements the quadratic formula, guarding against all eventualities for example, avoiding division by zero and allowing for complex root) Step 3: Duplays the solution, that is, the values for x Step 4: Allows the user the option to return to step 1 and repeat the process import numpy as no a eval(input("Please input as")) beval(input("Please input bi")) ceval(input("Please input es")) TWO el-0 22-0 d if a - 01 b**2- 4*a*e it b -- 01 print("There is no solution to this equation") elif b 1- DE x = -b/c print("The solution r , 1) elif a 1- Os if dor ri-(-b+np.sqrt(d))/(2a) 22-(-b-np.sqrt(d))/(2a) print("The solutions rl and r2 ares, r1, "and", 22,, respectively.") elif d < 0 print("The equation does not have real solutions.")
develop a flow chart and pseudocode for the problem below and show the steps and explain each lines Problem