Skip to content

horizontal motion code physics #4710

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 30 commits into from
Apr 4, 2022
Merged

horizontal motion code physics #4710

merged 30 commits into from
Apr 4, 2022

Conversation

avivfaraj
Copy link
Contributor

Describe your change:

Added code to calculate time, height and distance covered in horizontal projectile motion problem in physics.

  • 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}.

@ghost ghost added the require type hints https://docs.python.org/3/library/typing.html label Sep 4, 2021
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Click here to look at the relevant links ⬇️

🔗 Relevant Links

Repository:

Python:

Automated review generated by algorithms-keeper. If there's any problem regarding this review, please open an issue about it.

algorithms-keeper commands and options

algorithms-keeper actions can be triggered by commenting on this PR:

  • @algorithms-keeper review to trigger the checks for only added pull request files
  • @algorithms-keeper review-all to trigger the checks for all the pull request files, including the modified files. As we cannot post review comments on lines not part of the diff, this command will post all the messages in one comment.

NOTE: Commands are in beta and so this feature is restricted only to a member or owner of the organization.

@ghost ghost added the awaiting reviews This PR is ready to be reviewed label Sep 4, 2021
@ghost ghost removed the require type hints https://docs.python.org/3/library/typing.html label Sep 4, 2021
Copy link
Contributor

@QuantumNovice QuantumNovice left a comment

Choose a reason for hiding this comment

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

Good work.
+10 for really nice comments.

@avivfaraj avivfaraj requested a review from Kush1101 as a code owner September 6, 2021 17:17
@ghost ghost added awaiting changes A maintainer has requested changes to this PR and removed awaiting reviews This PR is ready to be reviewed labels Sep 6, 2021
@ghost ghost added awaiting reviews This PR is ready to be reviewed and removed awaiting changes A maintainer has requested changes to this PR labels Sep 7, 2021
@ghost ghost added awaiting reviews This PR is ready to be reviewed tests are failing Do not merge until tests pass and removed awaiting changes A maintainer has requested changes to this PR labels Sep 7, 2021
@ghost ghost removed the tests are failing Do not merge until tests pass label Sep 7, 2021
@avivfaraj avivfaraj requested a review from cclauss September 10, 2021 12:41
This reverts commit 5b0249a.

Undo changes
@wq
This reverts commit c37bb95.
@poyea poyea added the awaiting changes A maintainer has requested changes to this PR label Oct 22, 2021
@ghost ghost added tests are failing Do not merge until tests pass and removed awaiting changes A maintainer has requested changes to this PR labels Apr 4, 2022
@ghost ghost removed the tests are failing Do not merge until tests pass label Apr 4, 2022
@avivfaraj
Copy link
Contributor Author

Done revert to previous commit and fixed errors during pre-commit

@ghost ghost removed the awaiting reviews This PR is ready to be reviewed label Apr 4, 2022
@cclauss cclauss merged commit 1d3d18b into TheAlgorithms:master Apr 4, 2022
poyea pushed a commit that referenced this pull request May 16, 2022
* Add files via upload

* Changed print to f-string

Also printed out results in a math notation

* Add files via upload

* Fixes: #4710 provided return type

* File exists in another pull request

* imported radians from math

* Updated file according to pre-commit test

* Updated file

* Updated gamma

* Deleted duplicate file

* removed pi

* reversed tests

* Fixed angle condition

* Modified prints to f-string

* Update horizontal_projectile_motion.py

* Update horizontal_projectile_motion.py

* Fixes #4710 added exceptions and tests

* Added float tests

* Fixed type annotations

* Fixed last annotation

* Fixed annotations

* fixed format

* Revert "fixed format"

This reverts commit 5b0249a.

Undo changes
@wq

* Revert "Fixed annotations"

This reverts commit c37bb95.

* Revert "Fixed last annotation"

This reverts commit e3678fd.

* Revert "Fixed type annotations"

This reverts commit 3f2b238.

* Revert to 4e2fcaf

* Fixing errors found during pre-commit

* Added gauss law

* Implemented Lorenz tranformation with four vector

* pre-commit fixes

* flake8 fixes

* More flake8 fixes

* Added blank space for flake8

* Added reference

* Trailing whitespace fix

* Replaced argument u with velocity (descriptive name fix)

* Added tests for functions + moved velocity check to beta function

* Modified condition to 'not symbolic' in the transform function

* trainling whitespace fix

* Added type hint for 'smybolic' argument in transform function

* Changed reference to avoid pre-commit fails because of spelling issue related to the URL

* Added tests for gamma and transformation_matrix functions

* Fixed transformation_matrix tests

* Fixed tests on beta and gamma functions
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.

4 participants