【发布时间】:2026-01-14 00:25:01
【问题描述】:
我在尝试显示带限制的积分时收到错误“添加”对象不可调用。但是,在不使用限制或区分的情况下工作得非常好。 “方程”是一个随机生成的方程
from random import *
from sympy import *
from fractions import *
def IntegrateBetweenLimitsQuestion(Equation):
x, y = symbols('x,y')
a = 0
b = 0
while b == a:#so the limits cannot be the same number
b = randint(-5,5) #upperlimit
a = randint(-5,5) #lowerlimit
LimitQuestion = Integral(Equation(x, a, b))
return(LimitQuestion)
【问题讨论】:
标签: sympy callable integrate integral