Jun-19-2021, 08:30 AM
(This post was last modified: Jun-19-2021, 08:50 AM by Yoriz.
Edit Reason: Added code tags
)
My first code which is complex(ish).It is for quadratic equations. it may be a bit janky or bigger idk.It is made without any totorials so
thats why I want feed back .Started learning in the begining of covid ( not much experince ) . I dont know how to attach files so hope pasting the code is ok ?. And I am using replit.com not a code thing (idk what it is called) on my computer.
thats why I want feed back .Started learning in the begining of covid ( not much experince ) . I dont know how to attach files so hope pasting the code is ok ?. And I am using replit.com not a code thing (idk what it is called) on my computer.
def lineard (x,y,z) : return y*y-4*x*z a =int(input("Value of a = ")) b =int(input("Value of b = ")) c =int(input("Value of c = ")) p =lineard (a,b,c) print(p) import math if p > 0 : print("real and different roots") print((-b+math.sqrt(p))/2 * a) print((-b-math.sqrt(p))/2 * a) elif p == 0 : print("real and same roots") print(-b/2*a) else: print("roots are not real ") if a == 0: print("give valid numbers")
