Created
March 18, 2011 20:42
-
-
Save symtkn/876797 to your computer and use it in GitHub Desktop.
ikinci dereceden denklemin kökü
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
#!/usr/bin/python | |
def kok_hesapla(a,b,c): | |
delta=(b**2)-(4*a*c) | |
if delta>=0: | |
birinci_kok=(-b+(delta**0.5))/(2*a) | |
ikinci_kok=(-b-(delta**0.5))/(2*a) | |
print "Denklemin birinci kökü:",birinci_kok,"\n","Denklemin ikinci kökü:",ikinci_kok | |
else: | |
print"Denklemin gerçel kökü bulunmamaktadır." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment