geekcomputers / geekcomputers/Python
Term with mixed case NOT Captured
未关闭
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 35.4k
- 派生
- 12.9k
- 平均合并
- 2 小时 37 分钟
- 30 天内合并 PR
- 1
描述
If you have term = "Sin(20) + cOs(30)", term.replace(function, withmath) on LINE 50 above would not work except the whole term has been converted to lower case. Hence input validation is required.
Possible Solution:
Add term = term.lower() prior to the loop on LINE 47. Hence, this will remove the need for having .lower() on LINE 48's conditional statement.
@jwadel @Victory-Uchenna
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 calculator.py 第44-50行附近开始,重点查看项处理循环和替换条件。使用 Sin(20) + cOs(30) 这类大小写混合的函数名运行 calculator,并确认输入会在替换前进行规范化且产生预期结果。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- cli
- Issue 类型
- 缺陷
- 难度
- 1/5
- 预计耗时
- 1 小时以内
- 活跃度
- 停滞
- 描述清晰度
- 描述清楚
- 新手友好度
- 58/100