Discuss / Python / 作业

作业

Topic source

Vinyleve

#1 Created at ... [Delete] [Delete and Lock User]

import math def quadratic(a,b,c): if (bb-4ac)<0: t='方程无解' return t if (bb-4ac)>=0: x1=(-b+math.sqrt(bb-4ac))/(2a) x2=(-b-math.sqrt(bb-4ac))/(2a) return x1,x2 print (quadratic(1,3,4))


  • 1

Reply