Skip to content

Instantly share code, notes, and snippets.

View tunc2112's full-sized avatar
🤔
some weird things

tunc2112

🤔
some weird things
View GitHub Profile
@tunc2112
tunc2112 / compare_pow.py
Created November 10, 2021 12:02
uet-blackbox-testing-sample
def compare_pow(x, y):
"""
Compare x**y and y**x (x, y may be non-positive)
"""
if x == 0 >= y or x <= 0 == y:
return None
if x == 0 or y == 0:
return '<' if x < y else '>'