Python缩进已关闭?无法看到

时间:2015-11-23 22:11:26

标签: python indentation

我正在尝试运行我的代码以查看是否所有内容都已检出,但由于某种原因,它一直在说缩进是错误的。我没看到怎么样。据我所知,我使用了所有标签,而不是标签和空格的混合,大多数只是在函数定义的分号后按Enter键排列。

# This function needs to be defined: parameter, body definition
    def HalfAdder(self,x,y):
                S = int((x and not y) or (not x and y))
                C = int((x and y))
                return (S, C)
                pass

    def FullAdder(self,x,y,z):
                xy = int((x and not y) or (not x and y))
                S = int((z and not xy) or (not z and xy))
                xyz = int((z and xy))
                C1 = int((x and y) or (xyz))
                return (S,C1)
                pass

0 个答案:

没有答案
相关问题