def compute(x): for i in range(2, x): if x % i == 0: return False if x <= 1: return False return True x = eval (input()) if compute(x) == True: print('Prime') else: print('Not Prime')
Category: Python
全新的繁體中文 WordPress 網站
def compute(x): for i in range(2, x): if x % i == 0: return False if x <= 1: return False return True x = eval (input()) if compute(x) == True: print('Prime') else: print('Not Prime')