Skip to content

Added physical pressure units #5613

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

Merged
merged 5 commits into from
Oct 26, 2021
Merged

Conversation

SabariGanesh-K
Copy link
Contributor

This uses tuple pair which stores units required to be converted to respective other units as mentioned.
Available Units:- Pascal,Bar,Kilopascal,Megapascal,psi(pound per square inch),inHg(in mercury column),torr,atm

Describe your change:

  • Add an algorithm?
  • Fix a bug or typo in an existing algorithm?
  • Documentation change?

Checklist:

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
  • All new Python files are placed inside an existing directory.
  • All filenames are in all lowercase characters with no spaces or dashes.
  • All functions and variable names follow Python naming conventions.
  • All function parameters and return values are annotated with Python type hints.
  • All functions have doctests that pass the automated testing.
  • All new algorithms have a URL in its comments that points to Wikipedia or other similar explanation.
  • If this pull request resolves one or more open issues then the commit message contains Fixes: #{$ISSUE_NO}.

This uses tuple pair which stores units required to be converted to respective other units as mentioned.
Available Units:- Pascal,Bar,Kilopascal,Megapascal,psi(pound per square inch),inHg(in mercury column),torr,atm
@ghost ghost added the awaiting reviews This PR is ready to be reviewed label Oct 26, 2021
File was formatted as per repo rules
@ghost ghost added the tests are failing Do not merge until tests pass label Oct 26, 2021
@ghost ghost removed the tests are failing Do not merge until tests pass label Oct 26, 2021
@SabariGanesh-K
Copy link
Contributor Author

I did 2 conversion algorithm for the past 1 week . First one has been merged and this is the second one.
I am opening separate PR for this as it was mentioned in the rule to open separate PR for different algorithms.
@cclauss The tests are passing:) If you have any suggestions/Changes you may convey , else you may merge it !!

@cclauss
Copy link
Member

cclauss commented Oct 26, 2021

Is there are a separate source of conversions on the internet that can confirm our results?

@SabariGanesh-K
Copy link
Contributor Author

SabariGanesh-K commented Oct 26, 2021

I have a website , but that's not wikipedia. Shall I add it ? https://msestudent.com/what-are-the-units-of-pressure/
This is the website. @cclauss

@SabariGanesh-K
Copy link
Contributor Author

I have added reference website which has relevant unitary data .

@SabariGanesh-K
Copy link
Contributor Author

Alternatively you can google corresponding unitary value (like 1Pa to atm ) to evaluate multiplier needed

@cclauss
Copy link
Member

cclauss commented Oct 26, 2021

I was not referring to our unitary values. I was referring to going to a website that does conversions and then putting in our doctest values to see if their conversions match ours.

@SabariGanesh-K
Copy link
Contributor Author

I guess to do that you may visit https://www.unitconverters.net/pressure-converter.html

@SabariGanesh-K
Copy link
Contributor Author

@cclauss I have added website in reference which helps in converting between pressure units directly like how you asked.

Copy link
Member

@cclauss cclauss left a comment

Choose a reason for hiding this comment

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

doctest results match well with unitconverters.net

@ghost ghost removed the awaiting reviews This PR is ready to be reviewed label Oct 26, 2021
@cclauss cclauss merged commit 582f57f into TheAlgorithms:master Oct 26, 2021
@cclauss cclauss added the hacktoberfest-accepted Accepted to be counted towards Hacktoberfest label Oct 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest-accepted Accepted to be counted towards Hacktoberfest
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants