Resonant Frequency & Electrical Impedance by SKVKPandey · Pull Request #6983 · TheAlgorithms/Python · GitHub
Skip to content

Resonant Frequency & Electrical Impedance - #6983

Merged
cclauss merged 24 commits into
TheAlgorithms:masterfrom
SKVKPandey:master
Oct 29, 2022
Merged

cclauss merged 24 commits into
TheAlgorithms:masterfrom
SKVKPandey:master

Conversation

@SKVKPandey

Copy link
Copy Markdown
Contributor

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

@algorithms-keeper algorithms-keeper Bot added the awaiting reviews This PR is ready to be reviewed label Oct 11, 2022
Comment thread electronics/resonant_frequency.py Outdated
Comment thread electronics/resonant_frequency.py Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

A tuple of what?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The tuple contains the values of inductance and capacitance that are required for calculating the resonant frequency of the LC Circuit.

Comment thread electronics/resonant_frequency.py
Comment thread electronics/resonant_frequency.py Outdated

else:
return (
"resonant_frequency",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why are you returning the function name?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It is also the name of the value that the function is returning.

SKVKPandey and others added 6 commits October 15, 2022 09:40
Co-authored-by: Caeden <caedenperelliharris@gmail.com>
Co-authored-by: Caeden <caedenperelliharris@gmail.com>
Co-authored-by: Caeden <caedenperelliharris@gmail.com>
Comment thread electronics/resonant_frequency.py Outdated
Co-authored-by: Paul <56065602+ZeroDayOwl@users.noreply.github.com>
@algorithms-keeper algorithms-keeper Bot added the tests are failing Do not merge until tests pass label Oct 19, 2022
@algorithms-keeper algorithms-keeper Bot removed the tests are failing Do not merge until tests pass label Oct 19, 2022
@SKVKPandey SKVKPandey changed the title Resonant Frequency of LC Circuit Resonant Frequency & Electrical Impedance Oct 20, 2022
@SKVKPandey
SKVKPandey requested review from CaedenPH and ZeroDayOwl and removed request for CaedenPH and ZeroDayOwl October 21, 2022 07:26
Comment thread electronics/electrical_impedance.py Outdated
@@ -0,0 +1,41 @@
# https://en.wikipedia.org/wiki/Electrical_impedance

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could you add a brief description here about the impedance?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I have added the description for electrical impedance.

@@ -0,0 +1,41 @@
# https://en.wikipedia.org/wiki/LC_circuit

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same as before, perhaps add a brief explanation of LC circuits.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I have added the description for LC Circuit.

Comment thread electronics/resonant_frequency.py Outdated
Comment on lines +13 to +22

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

These doctests are good, however following general conventions, maybe you can move the successful case/s before the failed ones.

@SKVKPandey SKVKPandey Oct 22, 2022

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I have updated the doctests according to the general conventions.

@SKVKPandey
SKVKPandey requested a review from CaedenPH October 21, 2022 18:16
@SKVKPandey
SKVKPandey removed the request for review from CaedenPH October 22, 2022 05:13
@SKVKPandey
SKVKPandey requested a review from ZeroDayOwl October 22, 2022 05:13
@algorithms-keeper algorithms-keeper Bot added the tests are failing Do not merge until tests pass label Oct 22, 2022
@algorithms-keeper algorithms-keeper Bot removed the tests are failing Do not merge until tests pass label Oct 22, 2022
Comment thread electronics/electrical_impedance.py Outdated
Comment thread electronics/electrical_impedance.py Outdated
Comment thread electronics/resonant_frequency.py Outdated
SKVKPandey and others added 4 commits October 22, 2022 20:25
Co-authored-by: Paul <56065602+ZeroDayOwl@users.noreply.github.com>
Co-authored-by: Paul <56065602+ZeroDayOwl@users.noreply.github.com>
Co-authored-by: Paul <56065602+ZeroDayOwl@users.noreply.github.com>
@SKVKPandey
SKVKPandey requested review from CaedenPH and ZeroDayOwl and removed request for CaedenPH and ZeroDayOwl October 22, 2022 15:00

@CaedenPH CaedenPH left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@cclauss Can you review?

@cclauss
cclauss merged commit bd50a30 into TheAlgorithms:master Oct 29, 2022
@algorithms-keeper algorithms-keeper Bot removed the awaiting reviews This PR is ready to be reviewed label Oct 29, 2022
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