Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Percent Button Doesn't Work #1

Open
mindfultatiana opened this issue Feb 7, 2024 · 0 comments
Open

Percent Button Doesn't Work #1

mindfultatiana opened this issue Feb 7, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@mindfultatiana
Copy link
Owner

Describe the bug
I am able to do basic calculations with the calculator but when I try to add or subtract the percentage it doesn't work.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'TkinterCalculator'
  2. Click on 'myCalculatorV2.py'
  3. Scroll down to '# Calculate percentage' line 67-76
  4. Run the calculator and try to add or subtract a percentage
  5. See error

Expected behavior
I want the calculator to be able to add, subtract, multiply, and divide a percentage.

Desktop (please complete the following information):

  • OS: Windows 11
  • VS Code

Additional context
This may be an issue between the GUI and eval(). The main problem is it's parsing a string into numbers through the display. It's hard to grab a number and divide or multiply it before it's been parsed because it's still a string.

@mindfultatiana mindfultatiana added the bug Something isn't working label Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant