def main(): parser = argparse.ArgumentParser(description='Process some integers.') parser.add_argument('-nm', '--max_number', type=int, default=100, help='Maximum number to evaluate (default: 100)') args = vars(parser.parse_args()) maximum_number = args['max_number'] print("Starting to compute perfect numbers up to " + str(maximum_number)) for i in range(1, maximum_number): # cicles through every value if isPerfect(i): # tests every value print('Number ' + str(i) + ' is perfect.') # prints if its perfect
def main(): parser = argparse.ArgumentParser(description='Process some integers.') parser.add_argument('-mn', '--max_number', type=int, default=20, help='Max number to evaluate with isPerfect.') args = vars(parser.parse_args()) print(args) maximum_number = args['max_number'] print("Starting to compute perfect numbers up to " + str(maximum_number)) for i in range(1, maximum_number): if isPerfect(i): print('Number ' + str(i) + ' is perfect.')
def main(): print("Starting to compute perfect numbers up to " + str(maximum_number)) for i in range(1, maximum_number): if mf.isPerfect(i): print('Number ' + str(i) + ' is perfect.')
def main(): print("Starting to compute perfect numbers up to " + str(maximum_number)) for i in range(1, maximum_number): #cicles through every value if isPerfect(i): #tests every value print('Number ' + str(i) + ' is perfect.') #prints if its perfect