Professional Documents
Culture Documents
AICT CSC-101 FA23 BEE B Assignment-3 SP24
AICT CSC-101 FA23 BEE B Assignment-3 SP24
Problem 1: [CLO2-PLO2-C3][20
Marks]
For the quadratic equation a x 2 +bx +c=0 , the roots are found using the formula (where a ≠ 0):
−b ± √ b2−4 ac
x=
2a
Write a Python script that prompts user to enter the coefficceints (a ,b ,c ) and show the roots of x and print if the
roots are real or imaginary and equal or distinct.
(note: do not find the roots if the roots are complex, instead only print out that the roots are complex.)
Page 1 of 2
Problem 2: [CLO2-PLO2-C3][20 Marks]
Write a Python script that takes three inputs from user and returns the largest number out of the three. Write a
function to calculate the largest number. Write another function by the name of ‘main()’ that calls the earlier
function to calculate the largest number.
Page 2 of 2