Skip to content
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

[FEAT]: Create a factorial calculator script #103

Open
coxmars opened this issue Jan 22, 2025 · 12 comments
Open

[FEAT]: Create a factorial calculator script #103

coxmars opened this issue Jan 22, 2025 · 12 comments
Assignees
Labels
cairo-scripts difficult: easy enhancement New feature or request ODBoost This issue will be available ONLY during the ODBoost

Comments

@coxmars
Copy link
Contributor

coxmars commented Jan 22, 2025

📘 Description

We need to implement a script that calculates the factorial of a given number. The factorial (n!) is the product of all positive integers less than or equal to n. This will serve as a utility function that could be useful in various mathematical calculations within our project.

✅ Acceptance Criteria

  • Create a function that accepts a positive integer as input
  • Implement proper input validation (non-negative integers only)
  • Return the calculated factorial value
  • Include error handling for invalid inputs

🌎 References

📜 Additional Notes

  • Do not apply until the ODBoost begins.
  • Read our contribution guidelines before applying.
@coxmars coxmars added actual: 2 cairo-scripts difficult: easy good first issue Good for newcomers ODBoost This issue will be available ONLY during the ODBoost enhancement New feature or request and removed good first issue Good for newcomers actual: 2 labels Jan 22, 2025
@coxmars coxmars changed the title Create a factorial calculator script [FEAT]: Create a factorial calculator script Jan 22, 2025
@josephpdf
Copy link

Hello @coxmars
My name is Joseph Poveda, I am a member of the Dojo Coding community, where I am learning to contribute to open source. I have already made several contributions to different projects in different ecosystems, where I have been able to apply my knowledge in programming from front end, back end and documentation.

To solve this issue I would investigate and follow these steps to solve it:

  1. Function Design:

    • Create a function that takes a positive integer as input.
    • Implement logic to calculate the factorial using an iterative or recursive approach.
  2. Input Validation:

    • Ensure the input is a non-negative integer.
    • Return an error message for invalid inputs.
  3. Error Handling:

    • Include exceptions to manage edge cases, such as non-integer or negative values.
  4. Testing:

    • Test the function with a range of values, including edge cases like 0 and 1.

@GideonBature
Copy link
Contributor

Could I take over this issue?

I am a software engineer with working knowledge of Cairo. I will send my first PR in 48 hours.

@ChrisFernandezVivas
Copy link

hey im dojo member

ETA : 3 Days

how to solve?

1-research about factorial number example 4!
2- implement a function like recursive function for calculate this factorial
3- test the function
4- PR ready

thank you

@Nityam573
Copy link

Can I get assigned to this task @coxmars
I am proficient in cairo projects
View my Profile:
https://app.onlydust.com/u/Nityam573

@armaanansari121
Copy link

May I take this up? I've been a Competitive Programmer, I'm specialist at codeforces and I'm also good at cairo. So this would be perfect issue for me.

ETA: 24 hrs

@Jagadeeshftw
Copy link
Contributor

Proposal to Work on the Issue

I would be delighted to contribute to this issue, as I have extensive experience with Cairo programming and developing decentralized applications on StarkNet.

Estimated Timeline

I anticipate delivering a working solution within the next 24 hours. Please let me know if I can proceed.

Looking forward to contributing and collaborating!

Best regards,
Jagadeesh B

@ryzen-xp
Copy link

Hi,
I am proficient Blockchain developer expert in Cairo , Rust and Solidity and also in web development.
I have contributed many starknet project and more .
please /assign this issue .
Thank You !!

@savagechucks
Copy link

Hi. Can i take on this issue?

@Michaelkingsdev
Copy link

Could I grab this task?

@Benjtalkshow
Copy link
Contributor

I am a Full Stack Developer specializing in Next.js, TypeScript, Node.js, Cairo and Rust . With over 50 contributions across projects in the OnlyDust ecosystem, I’ve developed strong proficiency in delivering high-quality solutions and resolving complex issues within tight deadlines. My experience spans frontend, backend, smart contracts, and the optimization and maintenance of scalable codebases.
I can handle this task. Kindly assign.

@RomThpt
Copy link

RomThpt commented Jan 22, 2025

I’d love to work on this task and contribute to the project. I’ll be participating in the ETHDenver hackathon, and I see this as a great opportunity not only to help improve the project but also to grow my skills by tackling this issue.

@ShantelPeters
Copy link
Contributor

Can I work on this, please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cairo-scripts difficult: easy enhancement New feature or request ODBoost This issue will be available ONLY during the ODBoost
Projects
None yet
Development

No branches or pull requests