def square_root(number,iterations=100):
guess = number/2.0
for _ in range(iterations):
guess -= (guess**2-number)/(2*guess)
return guess
root ** (1 / index)
X1 = 0
X2 = 0
a = int(input('Input A :- '))
if (a == 0) : print('No Solution.')
else :
b = int(input('Input B :- '))
c = int(input('Input C :- '))
if (((b**2)-(4*a*c)) > 0) :
X1 = (-b+(math.sqrt(b**2-4*a*c)))/(2*a)
X2 = (-b-(math.sqrt(b**2+4*a*c)))/(2*a)
if (X1 == X2) : print('\nSolution =',X1)
else : print('\nSolotions =',X1,',',X2)
else : print('\nNo Solution.')
Users browsing this forum: Bing [Bot] and 3 guests