Question: REMINDER: Do not use any Python structures that we have not learned in class. For this specific assignment, you may use everything we have learned


REMINDER: Do not use any Python structures that we have not learned in class. For this specific assignment, you may use everything we have learned up to, and including, variables, types, mathematical and boolean expressions, user IO (i.e. print ( ) and input ( )), number systems, and the math / random modules, selection statements (i.e. if, elif, else), and for-and while-loops. Please reach out to us if you're at all unsure about any instruction or whether a Python structure is or is not allowed. Do not use, for example, user-defined functions (except for main ( ) if your instructor has covered it during lecture), string methods, file i/o, exception handling, dictionaries, lists, tuples, and/or object-oriented programming. Write a program that asks the user to input three floating-point numbers: a,b, and c (just this once, only these three single-letter variables will be permitted). These are the parameters of the quadratic equation. Classify the equation as one of the following: - Infinite number of solutions: For example, a=0,b=0,c= has an infinite number of solutions. - No solution: For example, a=0,b=0,c=4 has no solution. - No real solution: For example, a=1,b=0,c=4 has no real solutions. - One real solution: In cases there is a solutions, please print the solutions. - Two real solutions: In cases there are two real solutions, please print the solutions. Hint: If a=0 and there are real solutions to the equation, you can get these solutions using the following formula: Figure 4: The quadratic formula. The number of solutions depends on whether the discriminant (b24ac) is positive, zero, or negative. For example, an execution could look like: Please enter value of a: 1 Please enter value of b:4 Please enter value of c:4 This equation has 1 solution: x=2.0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
