Skip to content

Instantly share code, notes, and snippets.

View Ghdhdhdh's full-sized avatar

Jacob_str Ghdhdhdh

View GitHub Profile
@Ghdhdhdh
Ghdhdhdh / main.py
Created June 27, 2024 00:31
Its a triangular number calculator incase you are tired of doing it manually
# 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