MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / weird

Function weird

maths/special_numbers/weird_number.py:84–93  ·  view source on GitHub ↗

>>> weird(0) False >>> weird(70) True >>> weird(77) False

(number: int)

Source from the content-addressed store, hash-verified

82
83
84def weird(number: int) -> bool:
85 """
86 >>> weird(0)
87 False
88 >>> weird(70)
89 True
90 >>> weird(77)
91 False
92 """
93 return abundant(number) and not semi_perfect(number)
94
95
96if __name__ == "__main__":

Callers 1

weird_number.pyFile · 0.85

Calls 2

abundantFunction · 0.85
semi_perfectFunction · 0.85

Tested by

no test coverage detected