Professional Documents
Culture Documents
Python Lab 2
Python Lab 2
Engineering College
Department of Computer Application
Assignment-2
Semester-1
Saikat Mazumder
Roll-25
9) Write a program that prompts the user to input a character and determine if the
character is vowel or consonant.
6) The roots of the quadratic equation ax2 + bx + c = 0, a ≠ 0 are
given by the following formula:
In this formula, the term b2 - 4ac is called the discriminant. If b2
- 4ac = 0, then the equation
has two equal roots.
If b2 - 4ac > 0, the equation has two real roots. If b2 - 4ac < 0,
the equation has two complex
roots.
Write a program that prompts the user to input the value of a
(the coefficient of x 2), b (the
coefficient of x), and c (the constant term) and outputs the roots
of the quadratic equation.