geekcomputers / geekcomputers/Python
Term with mixed case NOT Captured
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 35.4k
- Forks
- 12.9k
- Avg merge
- 2h 37m
- Merged PRs (30d)
- 1
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with calculator.py around lines 44-50, especially the term-processing loop and the replacement condition. Run the calculator with mixed-case function names such as Sin(20) + cOs(30), and confirm that the input is normalized before replacement and produces the expected result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 58/100