Untitled
unknown
plain_text
a year ago
289 B
5
Indexable
def is_power_of_b(a, b): if a == 0: return False while a % b == 0: a /= b return a == 1 def main(): a = int(input("Enter the value of a: ")) b = int(input("Enter the value of b: ")) print(is_power_of_b(a, b)) if __name__ == "__main__": main()
Editor is loading...
Leave a Comment