---
name: roll-dice
description: Produce a local integer dice roll for d6, d20 or another explicit number of sides.
---
Accept an integer from 2 to 1,000 as the number of sides. Use scripts/roll.ps1 in PowerShell or scripts/roll.sh in Bash. Supply the count as 1 for a single roll. Report the resulting integer.
本例需在 Windows、Python 3.12。各实验所需工具和版本见下载包 README。 中运行,请复制源码、保存文件或下载工程包后在本地执行验证。
运行说明与环境独立工程
运行环境:Windows、Python 3.12。各实验所需工具和版本见下载包 README。
入口文件:projects/skills-practice/roll-dice/SKILL.md
本地运行步骤快速上手
- 点击上方“保存源码”保存为
SKILL.md,或下载右侧课程工程包。 - 确认本地已准备 Windows、Python 3.12。各实验所需工具和版本见下载包 README。。
- 按对应章节命令执行,结合正文核对实际输出。
附件与关联工程包下载
课程关联工程包(登记关联3章) · 含当前章节或实例 · mbskycom202612a347.zip
课程关联工程包(登记关联39章) · 含当前章节或实例 · mbskycom202612a331.zip