This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# how many more triangular numbers to find | |
iter = 100 | |
# Is the answer compact | |
compact = True | |
def find_tri_nums(iter: int, compact: bool, print_ans:bool) -> int: | |
""" | |
:param iter: up to what triangular number do you want to calculate | |
:param compact: If printing is true, print it out in a compact format | |
:param print: Set to true if you want to print the results to the console. Set to false if you want a return dictionary |