"""A NOT Gate is a logic gate in boolean algebra which results to 0 (False) if theinput is high, and 1 (True) if the input is low.Following is the truth table of a XOR Gate:------------------------------| Input | Output |------------------------------| 0 | 1 || 1 | 0 |------------------------------Refer - https://www.geeksforgeeks.org/logic-gates-in-python/"""def not_gate(input_1: int) -> int:"""Calculate NOT of the input values>>> not_gate(0)1>>> not_gate(1)0"""return 1 if input_1 == 0 else 0if __name__ == "__main__":import doctestdoctest.testmod()
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。