2015-09-06 素数を求めるアルゴリズム python def sosu(s): for i in range(2,s-1): if s % i ==0: return ("素数じゃない") else: return ("素数") sosu(10)