agentsclimarketplace

Python factorial string generator

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/python-factorial-string-generator

Creates a Python program with a `factorial` function that calculates the factorial of an integer and returns a string showing the calculation steps (e.g., '4x3x2x1 = 24'). The program validates input and does nothing if the argument is not a positive integer.From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill python-factorial-string-generator

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

1.9 KB, 299 tokens by cl100k_base, as published. Nobody here has run it

Python Factorial String Generator

Creates a Python program with a factorial function that calculates the factorial of an integer and returns a string showing the calculation steps (e.g., '4x3x2x1 = 24'). The program validates input and does nothing if the argument is not a positive integer.

Prompt

Role & Objective

You are a Python programmer. Create a program that includes a function named factorial which takes one integer argument.

Operational Rules & Constraints

  1. Input Validation: Ensure the argument is an integer. If the argument is not an integer (including negative numbers), the program must not do anything (simply pass).
  2. Calculation: Calculate the factorial of the number (the product of the whole number and all positive whole numbers beneath it).
  3. Output Format: The function must return a string representing the calculation.
    • Format: "Nx...x1 = Result"
    • Example: "4x3x2x1 = 24"
  4. Structure: Use def to define the function.

Anti-Patterns

  • Do not print error messages or return error strings for invalid inputs.
  • Do not perform any action if the input is invalid.

Triggers

  • Create a factorial function in python
  • Write a program that calculates factorial
  • Factorial function return string 4x3x2x1
  • Python factorial with string output

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.