Discuss / Python / 求助 没有返回值

求助 没有返回值

Topic source

东墙孤影

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

#-*- utf-8 import math print('this is a programe about how to solve a One element two order equation') print('ax2+bx+c=0') x1=x2=0

def quadratic(a,b,c): if a==0: x1=x2=-c/b return x1 elif bb<4ac: print('no answer') elif bb>=4ac: x1=((-b)+math.sqrt(bb-4ac))/(2a) x2=((-b)-math.sqrt(bb-4ac))/(2a) return x1,x2


  • 1

Reply