numberOfPoint = 0 point_array = [] point = 0 maxpoint = 0 minipoint = 0 while numberOfPoint < 2 or numberOfPoint > 1000: numberOfPoint = input("点の数を入力してください") while point_array.count < numberOfPoint: point = input("点の座標を入力してください") if point >= pow(10, -5) and point <= pow(10, 5): point_array.append(point) for p in point_array: if p > maxpoint: maxpoint = p for p in point_array: if p < minipoint: minipoint = p print(maxpoint) print(minipoint)