Skip to content

Improvements to combinations.py #3682

Closed
@Rolv-Apneseth

Description

@Rolv-Apneseth

I have made some improvements to combinations.py. Pr #3681 (Forgot to make issue before submitting pr apologies)

Added:

  • A description at the top, which includes a wikipedia link
  • Type hints to the combinations function
  • Some more doctests, which include 0 and negative numbers
  • A check within the function so the function does not attempt to get factorials of negative numbers
  • Some print statements in the main block which show some practical applications of the function

If you would like anything else, or if you don't like the changes, please let me know. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions