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

Add distance_calculator #531

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Mathdallas-code
Copy link

I'd like to add a distance calculation program i made

@Mathdallas-code
Copy link
Author

@souravjain540 please review

Copy link

@bluesiarra bluesiarra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code works for positive integers but doesn't accept negative points (ex: (-2,0)). In addition, there should be a way to break out of the while loop, such as inputting a sentinel value.

@Mathdallas-code
Copy link
Author

Mathdallas-code commented Jan 15, 2025

The code works for positive integers but doesn't accept negative points (ex: (-2,0)). In addition, there should be a way to break out of the while loop, such as inputting a sentinel value.

Ok I will try to fix it, and thanks for telling 👍

Edit: I fixed the bug and it was actually really easy. I just replaced every .isdigit() with .isalpha()

Fixed a bug where negative numbers were not allowed and added a quit features
Copy link

@bluesiarra bluesiarra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Made the calculator compatible with floating(decimal)numbers
@Mathdallas-code
Copy link
Author

Looks good!

Thanks! I also fixed a bug where decimal numbers were incompatible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants