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
molecular mass
chickens,cows,pigs
Restaurant 1
Юра и заселение
Game2
my first print
Ej2_python_204676887
Python | Random elements with atleast K occurrences
ALAMOST DONUTZ dungeon
floating point limitations