注册 登录
编程论坛 Python论坛

为何程序不运行?小白求解答。

greenpop 发布于 2022-03-10 15:46, 1347 次点击
s=0
def jisuan(one,two):
    a=one+two
    b=one*two
    c=one/two
    return a,b,c
x=int(input('输入x:'))
y=int(input('输入y:'))

if y==0:
    print('y不能为0')
    y=int(input('输入y:')
         
s=jisuan(x,y)
print(s)
2 回复
#2
古1232022-03-10 20:42
回复 楼主 greenpop
第二个 y=int(input('输入y:')少了个右括号
#3
sssooosss2022-03-25 19:57
版主正解,共同学习
1