-
-
Notifications
You must be signed in to change notification settings - Fork 46.5k
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
Added the algorithm to compute the terminal velocity of an object fal… #10237
Added the algorithm to compute the terminal velocity of an object fal… #10237
Conversation
Could someone please review this pull request. |
physics/terminal_velocity.py
Outdated
raise ValueError( | ||
"mass, density, area and the drag coefficient all need to be positive" | ||
) | ||
return ((2 * mass * 9.8) / (density * area * drag_coefficient)) ** 0.5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of using a hard-coded 9.8
for the acceleration due to gravity, could you import the constant from scipy.constants
? The constant value in this library is more accurate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure , I'll import the value of g and commit the changes
578728f
to
0ca5e82
Compare
f7f347c
to
2cd825f
Compare
Thanks for your contribution! |
TheAlgorithms#10237) * added the algorithm to compute the terminal velocity of an object falling in a fluid * fixed spelling mistake * fixed issues in topic description * imported the value of g from scipy and changed the doctests accordingly * fixed formatting * Apply suggestions from code review --------- Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
…ling in a fluid
Describe your change:
Checklist: