this program prints a pyramid (its from a cs50 problem set). I call the function recursively by decrementing n, but i also wanted to keep track of its initial value in all the loops after the first one, so I made the function take two arguments, both of which are the same value(height) is this bad? def main(): height = get_h() pyram(height, height) def pyram(n, k): if n > 1: pyram(n-1, k) print(" " * (k - n), end = "") print("#" * n, end = " ") print("#" * n) def get_h(): while True: try: inp = int(input("height?: ")) except ValueError: print("no") if inp > 0: return inp if __name__ == "__main__": main() Continue reading...