Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Added Python factorial calculating snippet #214

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
SamratBarai wants to merge 9 commits into quicksnip-dev:main from SamratBarai:main
Closed

Added Python factorial calculating snippet #214

SamratBarai wants to merge 9 commits into quicksnip-dev:main from SamratBarai:main

Conversation

Copy link
Contributor

@SamratBarai SamratBarai commented Jan 8, 2025
edited
Loading

Description

Added a new snippet for calculating factorials of a number

Type of Change

  • ✨ New snippet
  • πŸ›  Improvement to an existing snippet
  • 🐞 Bug fix
  • πŸ“– Documentation update
  • πŸ”§ Other (please describe):

Checklist

  • I have tested my code and verified it works as expected.
  • My code follows the style and contribution guidelines of this project.
  • Comments are added where necessary for clarity.
  • Documentation has been updated (if applicable).
  • There are no new warnings or errors from my changes.

Related Issues

Closes #

Additional Context

Screenshots (Optional)

Click to view screenshots

@SamratBarai SamratBarai changed the title (ε‰Šι™€) Calculating the factorial of a number (ε‰Šι™€γ“γ“γΎγ§) (追記) Added Python factorial calculating snippet (θΏ½θ¨˜γ“γ“γΎγ§) Jan 8, 2025
Copy link
Collaborator

@Mathys-Gasnier Mathys-Gasnier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, thanks for the contribution, could you please also merge main to your branch, making sure /public/consolidated doesn't exist ?


# Usage:
print(factorial(4)) # Returns 24
print(factorial(-4)) # Returns type error for invalid inputs
Copy link
Collaborator

@Mathys-Gasnier Mathys-Gasnier Jan 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO I don't think it's needed to showcase the errors

title: Calculate Factiorial of a number
description: Calculates factorial of a given number using recursive function
author: SamratBarai
tags: python,math,factorial,recursive-function
Copy link
Collaborator

@Mathys-Gasnier Mathys-Gasnier Jan 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please read the CONTRIBUTING.md file before adding snippets. Tags shouldn't contain the name of the language they are written in

Copy link
Contributor Author

@SamratBarai SamratBarai Jan 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, calculate-compound-interest.md also has this tag

Copy link
Contributor Author

@SamratBarai SamratBarai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed unneccesary tags

@SamratBarai SamratBarai marked this pull request as draft January 9, 2025 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@saminjay saminjay saminjay left review comments

@Mathys-Gasnier Mathys-Gasnier Mathys-Gasnier requested changes

@psychlone77 psychlone77 Awaiting requested review from psychlone77 psychlone77 is a code owner

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /