Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Assignment-3b
#python 3.6.9 #Assignment-3b import math a=int(input("Enter the number \n")) b=int(input("Enter the number \n")) c=int(input("Enter the number \n\n")) dis=(b*b)-(4*a*c) if(dis>0): print("Roots are real and unequal\n") m=math.sqrt(dis) r1=((-b)+m)/(2*a) r2=((-b)-m)/(2*a) print("1st root= ",r1,"2nd root= ",r2) elif(dis==0): print("Roots are real and equal\n") r1=(-b)/(2*a) r2=r1 print("1st root= ",r1,"2nd root= ",r2) else : print("Roots are imaginary\n") m=math.sqrt(-dis) r1=(-b)/(2*a) r2=m/(2*a) print("1st root= ",r1,"+i",r2,"2nd root= ",r1,"-i",r2)
run
|
edit
|
history
|
help
0
Hello
Ej2_PYTHON_203700377.
f strings 2
isPalindrome.py
BasicPattern.py
Tupples
sheru1
Python
PYTHON 3
pico menu