A downloadable Math Calculator

I know this isn't a software utility. It is a graphing calculator.

Sometimes when you get a input numbers below 3, it will say Input Error but I don't know why it would, because if you input a number over 3, it will still say Input Error.


Download

Download
Coordinate Plane.py 3 kB
Download
Coordinate Plane 2.0.py 17 kB

Development log

Comments

Log in with itch.io to leave a comment.

This code is messy, so I made a few cleanups. Check your Slack messages.

How is it messy?

Short answer: Old code was not optimized. It had many redundant lines of code. 

Long answer: Here's a list of things that were addressed:

  1. Declaring the variables at the start but then re-declaring them in each of the if statements. This is highly inefficient and can be fixed by putting the lines of code into a single function.
  2. Executing the print commands by each column. Lines of text DO NOT need to be printed one-by-one.  Use "\n" to indicate a new line.
  3. The print commands are put into each and every one of the if statements. Again highly inefficient and can be fixed by putting them into a single function.    
  4. It seems that you did not learn from my edit on S-Spense. Multiple if statements on the same level can be replaced by else if or "elif". This is a good habit and will save you from some trouble in certain applications.
  5. On the last part which detects for invalid inputs, the second part where it detects if both X and Y inputs are too high is not needed. In fact, a single elif statement will do for detecting invalid inputs.