Question: I am new to python and am trying to code the following formula but keep getting this error. Any help would be greatly appreciated. Thanks

For each exercise, you should carefully analyze the problem requirements and design PROGRAMMING Pedagogical Note strategies for salving the problem before coding. Debugging Tip several representative inputs by hand or using an IDE debugger. You learn how to pro Before you ask for help, read and explain the program to yourself, and trace it using gram by debugging your own mistakes. Section 4.2 *4.1 (Algebra: solve quadratic equations) The two roots of a quadratic equation, for example, ar? + bx + c = 0, can be obtained using the following formula: -b+ 86 - 4ac -b-V6 - 4ac and r2 = 2a y = 2a b2 - 4ac is called the discriminant of the quadratic equation. If it is positive, the equation has two real roots. If it is zero, the equation has one root. If it is negative, the equation has no real roots. Write a program that prompts the user to enter values for a, b, and c and displays the result based on the discriminant. If the discriminant is positive, display two roots. If the discriminant is 0 display one root. Otherwise, display The equa- tion has no real roots. Here are some sample runs. Activities Wing 101 7.2 Feb 5 18:53 section42.py Vhome/anthony/Documents/CSC-101) Wing File Edit Source Qebug Tools Window Help sections 2.py 7 Excepbons Call Stack Options File "/home/anthony Documents/CSC-101/ section4_2.py", line 11. in
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
