def quadratic_roots(a,b,c):
if not (type(a)==int or type(a)==float) and (type(b)==int or type(b)==float)\
and (type(c)==int or type(c)==float):
print("Error. Must be numbers.")
return None
equation=(b**2)-(4*a*c)
realRoots=[]
if equation<0:
return realRoots
elif equation==0:
x1=-b/(2*a)
#realRoots.append(x)
return [x1]
else:
x1=(-b+((equation)^(1/2))/(2*a)
x2=(-b-((equation)^(1/2))/(2*a)
return realRoots.append(x1,x2)
私の二次根をリストに入れる必要がありますが、構文エラーが発生します。コードが正しく機能するように編集するにはどうすればよいですか?二次根をリストに配置する