Conversation
|
@poyea @dhruvmanila Hello, can anyone of you please review my contribution to this repository? I'll be glad to get some suggestions and learn from them, Thanks. |
Updated the write-up of reference given in the code. Co-authored-by: John Law <johnlaw.po@gmail.com>
|
Thanks @poyea for the suggestion and reviewing my code :) I've made the change. Also, I checked other implementations in the the /maths/series folder. In the implementation of arithmetic mean and geometric mean, the code first checks if a series is an arithmetic or a geometric series respectively. But arithmetic and geometric mean can be computed without the series actually being an arithmetic and a geometric series respectively. So the condition that requires a series to follow arithmetic or geometric progression should be removed. Should I proceed to make that change? |
|
Yes, you may make those changes on this branch. |
|
Thank you so much @poyea for the approval. I have incorporated the changes to the branch. 😊👍🏼 |
|
@poyea Ah yes, we can do that as well! I think it is better to add the methods is_arithmetic_series and is_geometric_series to a new file arithmetic_series.py (as it isn't available in the repository) and geometric_series.py respectively. So along with the implementation we can also check if the series is arithmetic/geometric. With that we can add one more method is_harmonic_series to the file harmonic_series.py. Do tell me if you need those changes. |
@atharva01903 Let's do it this way: |
|
Alright @poyea, I did that. Now the |
poyea
left a comment
There was a problem hiding this comment.
Thank you for your pull request!🤩
* added harmonic mean * Update maths/series/harmonic_mean.py Updated the write-up of reference given in the code. Co-authored-by: John Law <johnlaw.po@gmail.com> * changes in arithmetic and geometric mean code * mean and series added in a single file Co-authored-by: John Law <johnlaw.po@gmail.com>
Describe your change:
Added the implementation of harmonic mean.
Checklist:
Fixes: #{$ISSUE_NO}.