python) Find at least 12 issues in the code. A = int(input("Enter a number for A: ")) B = str(input("Enter a number for B: ")) C = int(input("Enter a number for C: ")) #Check that user input for A is not 0. if A = 0:     print("Your coefficient for 'A' MUST BE a value greater than 0, otherwise your equation is not a quadratic!")     int(input(Please enter a new value for a:")) = A import math: //Compute the discriminant. disc = (B*B) - (4*A*C) #Display the disciminant computed. print("\nThe discriminant of your equation is", str(disc) + ".") #Check the sign of the computed discriminant if disc == 0:     print("This equation has 1 real solution.")     x = (-B + math.sqrt(disc)) / (2 * A)     print("The solution to your equation is:", x) elif disc > 0     print("This equation has 2 real solutions.")     x1 == (-B + math.sqrt(disc)) / (2 * A)     x2 == (-B - math.sqrt(disc)) / (2 * A)     print("One solution to your equation is:", x1)     print("The other solution to your equation is:" + x2) else if disc  < 0:     print "This equation has 2 imaginary solutions.")

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter3: Assignment, Formatting, And Interactive Input
Section3.4: Program Input Using Cin
Problem 8E
icon
Related questions
Question

(python)

Find at least 12 issues in the code.

  1. A = int(input("Enter a number for A: "))
  2. B = str(input("Enter a number for B: "))
  3. C = int(input("Enter a number for C: "))
  4. #Check that user input for A is not 0.
  5. if A = 0:
  6.     print("Your coefficient for 'A' MUST BE a value greater than 0, otherwise your equation is not a quadratic!")
  7.     int(input(Please enter a new value for a:")) = A
  8. import math:
  9. //Compute the discriminant.
  10. disc = (B*B) - (4*A*C)
  11. #Display the disciminant computed.
  12. print("\nThe discriminant of your equation is", str(disc) + ".")
  13. #Check the sign of the computed discriminant
  14. if disc == 0:
  15.     print("This equation has 1 real solution.")
  16.     x = (-B + math.sqrt(disc)) / (2 * A)
  17.     print("The solution to your equation is:", x)
  18. elif disc > 0
  19.     print("This equation has 2 real solutions.")
  20.     x1 == (-B + math.sqrt(disc)) / (2 * A)
  21.     x2 == (-B - math.sqrt(disc)) / (2 * A)
  22.     print("One solution to your equation is:", x1)
  23.     print("The other solution to your equation is:" + x2)
  24. else if disc  < 0:
  25.     print "This equation has 2 imaginary solutions.")
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning