Skip to content

Instantly share code, notes, and snippets.

@sedaghatfar
Last active December 15, 2015 06:39
Show Gist options
  • Save sedaghatfar/5217853 to your computer and use it in GitHub Desktop.
Save sedaghatfar/5217853 to your computer and use it in GitHub Desktop.
My first project, quadratic formula solver
#quadratic formula
def quad(a,b,c):
root1 = (-b+((b**2)-4*a*c)**(.5))/(2*a)
root2 = (-b-((b**2)-4*a*c)**(.5))/(2*a)
print(root1)
print(root2)
return a,b,c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment