多分支
例如:求一个二次方程的实根
# quadratic.py
import math
def main():
print("Let us finds the solutions to a quadratic\n")
a,b,c=eval(input("Do enter the coefficients(a,b,c)"))
delta=b*b-4*a*c
if delta<0:
print("\nEquation has no real roots!")
elif delta==0:
x=-b/(2*a)
print("There is a double root at",x)