python-math

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
Overview
Run short Python scripts inside the skill workspace. Results can be returned as text and saved as output files.
Examples
  1. Print the first N Fibonacci numbers
    Command:
    python3 scripts/fib.py 10 > out/fib.txt
  2. Sum a list of integers
    Command:
    python3 - <<'PY' from sys import stdin nums = [int(x) for x in stdin.read().split()] print(sum(nums)) PY
Output Files
  • out/fib.txt
概述
在skill工作区内运行简短的Python脚本。结果可以以文本形式返回并保存为输出文件。
示例
  1. 打印前N个斐波那契数
    命令:
    python3 scripts/fib.py 10 > out/fib.txt
  2. 对整数列表求和
    命令:
    python3 - <<'PY' from sys import stdin nums = [int(x) for x in stdin.read().split()] print(sum(nums)) PY
输出文件
  • out/fib.txt