--- title: mk_common --- # **模块** `nonebot_plugin_marshoai.tools.marshoai_megakits.mk_common` --- ### ***async func*** `random_turntable(upper: int, lower: int)` **说明**: Random Turntable **参数**: > - upper (int): _description_ > - lower (int): _description_ **返回**: _type_: _description_
源代码在GitHub上查看 ```python async def random_turntable(upper: int, lower: int): return random.randint(lower, upper) ```
--- ### ***async func*** `number_calc(a: str, b: str, op: str) -> str` **说明**: Number Calc **参数**: > - a (str): _description_ > - b (str): _description_ > - op (str): _description_ **返回**: str: _description_
源代码在GitHub上查看 ```python async def number_calc(a: str, b: str, op: str) -> str: a, b = (float(a), float(b)) match op: case '+': return str(a + b) case '-': return str(a - b) case '*': return str(a * b) case '/': return str(a / b) case '**': return str(a ** b) case '%': return str(a % b) case _: return '未知运算符' ```