该怎么把noanswer加进代码里面
https://thumbnail1.baidupcs.com/thumbnail/1492bc475lb378a68db610a53b0a3574?fid=1590253992-250528-715479893233954&rt=pr&sign=FDTAER-DCb740ccc5511e5e8fedcff06b081203-yUuPASJ1seIX1TpxCpxMyruaJwU%3d&expires=8h&chkbd=0&chkv=0&dp-logid=391947512040330559&dp-callid=0&time=1672488000&size=c1463_u915&quality=90&vuk=1590253992&ft=image&autopolicy=1num1,num2=map(int,input().split())
jia = (int(num1) + int(num2))
jian = (int(num1) - int(num2))
cheng = (int(num1) * int(num2))
chu = (int(num1) // int(num2))
print(jia,jian,cheng,chu)
是不是要加一个捕获异常的程序 第四个除法肯定要判断除数不为零啊,其他的就没有异常了
页:
[1]