一.代码
#两句单分支
import math
x=int(input("请输入自变量x:"))
if(x>=0):
y=(math.pow(x,2)-3*x)/(x+1)+2*math.pi+math.sin(x)
if(x<0):
y=math.ln(-5*x)+6*math.sqrt(abs(x)+math.e**4)-(x+1)**3
print(y)
#两句单分支
import math
x=int(input("请输入自变量x:"))
if(x>=0):
y=(math.pow(x,2)-3*x)/(x+1)+2*math.pi+math.sin(x)
if(x<0):
y=math.ln(-5*x)+6*math.sqrt(abs(x)+math.e**4)-(x+1)**3
print(y)