#!/usr/bin/python3 # this code is created for holy purposes, and any misuse of this software # such as in a serious situation will lead to a curse of the worst kind # you can share this software but you must keep it's holy and divine # message and purpose - deviance from this path could destroy your soul import argparse from sympy import isprime import inflect #i inflect that the first man to have made this for the second, the others and me is blessed p = inflect.engine() # this defines args.reveal_sin as false by default parser = argparse.ArgumentParser() parser.add_argument("--reveal-sin", action="store_true", help="Ignore sinful numbers.") parser.add_argument("--godless", action="store_true", help="Godless mode (warning!)") parser.add_argument("--ignore-meek", type=int, default=0, help="Ignore numbers by their meekness.") parser.add_argument("iters", type=int, nargs='?', default=None, help="An integer of how many iterations of faithful numbers to generate and test for holyness.") args = parser.parse_args() if args.godless and not args.reveal_sin: print("You need to change your ways for this to actually work.") exit if args.iters == None: fiters = 32 else: fiters = args.iters def fibon(n): a = 0 b = 1 n = n + 1 for i in range(1,n): a, b = b, a + b if (i < args.ignore_meek): continue ord = p.ordinal(i) #ordinal numbers are '1st' '2nd' '3rd' etc if isprime(a): if not args.godless: print(f"The {ord} number {a} is prime, and therefore divine!") else: if args.reveal_sin: print(f"The {ord} number {a} is not prime, and thusly haram.") fibon(fiters) if args.iters == None: print("You can run this command with the number of interations you wish to test for holiness.")