python-math
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseOverview
Run short Python scripts inside the skill workspace. Results can be
returned as text and saved as output files.
Examples
-
Print the first N Fibonacci numbersCommand:python3 scripts/fib.py 10 > out/fib.txt
-
Sum a list of integersCommand: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脚本。结果可以以文本形式返回并保存为输出文件。
示例
-
打印前N个斐波那契数命令:python3 scripts/fib.py 10 > out/fib.txt
-
对整数列表求和命令:python3 - <<'PY' from sys import stdin nums = [int(x) for x in stdin.read().split()] print(sum(nums)) PY
输出文件
- out/fib.txt