From cfcec2c77fdb82c09b872300da6a4ab266a61527 Mon Sep 17 00:00:00 2001 From: Shashank Kashyap <50551759+SKVKPandey@users.noreply.github.com> Date: Sat, 8 Oct 2022 21:52:34 +0530 Subject: [PATCH 01/24] Resonant Frequency --- electronics/resonant_frequency.py | 36 +++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 electronics/resonant_frequency.py diff --git a/electronics/resonant_frequency.py b/electronics/resonant_frequency.py new file mode 100644 index 000000000000..80405cfdf6ad --- /dev/null +++ b/electronics/resonant_frequency.py @@ -0,0 +1,36 @@ +# https://en.wikipedia.org/wiki/LC_circuit + +from __future__ import annotations +from math import sqrt +from math import pi + +def resonant_frequency(inductance: float, capacitance: float) -> tuple: + + """ + This function can calculate the resonant frequency of LC circuit, + for the given value of inductance and capacitnace. + + Examples are given below: + >>> resonant_frequency(inductance=0, capacitance=5) + ValueError: Inductance cannot be 0 or negative + >>> resonant_frequency(inductance=10, capacitance=0) + ValueError: Capacitance cannot be 0 or negative + >>> resonant_frequency(inductance=10, capacitance=5) + 0.022507907903927652 + """ + + if inductance<=0: + raise ValueError("Inductance cannot be 0 or negative") + + elif capacitance<=0: + raise ValueError("Capacitance cannot be 0 or negative") + + else: + return(float(1/(2*pi*(sqrt(inductance*capacitance))))) + +if __name__ == "__main__": + import doctest + + doctest.testmod() + + From 75d431105230430e6942e36d0aa38740b2173e9f Mon Sep 17 00:00:00 2001 From: Shashank Kashyap <50551759+SKVKPandey@users.noreply.github.com> Date: Tue, 11 Oct 2022 13:59:26 +0530 Subject: [PATCH 02/24] Resonant Frequency of LC Circuit --- electronics/resonant_frequency.py | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/electronics/resonant_frequency.py b/electronics/resonant_frequency.py index 80405cfdf6ad..3c5c557f4219 100644 --- a/electronics/resonant_frequency.py +++ b/electronics/resonant_frequency.py @@ -1,8 +1,9 @@ # https://en.wikipedia.org/wiki/LC_circuit - from __future__ import annotations + +from math import pi as PI from math import sqrt -from math import pi + def resonant_frequency(inductance: float, capacitance: float) -> tuple: @@ -12,21 +13,29 @@ def resonant_frequency(inductance: float, capacitance: float) -> tuple: Examples are given below: >>> resonant_frequency(inductance=0, capacitance=5) + Traceback (most recent call last): + ... ValueError: Inductance cannot be 0 or negative >>> resonant_frequency(inductance=10, capacitance=0) + Traceback (most recent call last): + ... ValueError: Capacitance cannot be 0 or negative >>> resonant_frequency(inductance=10, capacitance=5) - 0.022507907903927652 + ('resonant_frequency', 0.022507907903927652) """ - if inductance<=0: + if inductance <= 0: raise ValueError("Inductance cannot be 0 or negative") - elif capacitance<=0: + elif capacitance <= 0: raise ValueError("Capacitance cannot be 0 or negative") else: - return(float(1/(2*pi*(sqrt(inductance*capacitance))))) + return ( + "resonant_frequency", + float(1 / (2 * PI * (sqrt(inductance * capacitance)))), + ) + if __name__ == "__main__": import doctest From 83fbe1ee1f3508771b928d3f1718431ebbab54dc Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 11 Oct 2022 08:38:04 +0000 Subject: [PATCH 03/24] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- electronics/resonant_frequency.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/electronics/resonant_frequency.py b/electronics/resonant_frequency.py index 3c5c557f4219..0115819f9f27 100644 --- a/electronics/resonant_frequency.py +++ b/electronics/resonant_frequency.py @@ -41,5 +41,3 @@ def resonant_frequency(inductance: float, capacitance: float) -> tuple: import doctest doctest.testmod() - - From 63e739d30e1b6b660242c1f63fdbffced6d08d31 Mon Sep 17 00:00:00 2001 From: Shashank Kashyap <50551759+SKVKPandey@users.noreply.github.com> Date: Sat, 15 Oct 2022 09:40:01 +0530 Subject: [PATCH 04/24] Update electronics/resonant_frequency.py Co-authored-by: Caeden --- electronics/resonant_frequency.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/electronics/resonant_frequency.py b/electronics/resonant_frequency.py index 0115819f9f27..0fa245697af6 100644 --- a/electronics/resonant_frequency.py +++ b/electronics/resonant_frequency.py @@ -1,8 +1,7 @@ # https://en.wikipedia.org/wiki/LC_circuit from __future__ import annotations -from math import pi as PI -from math import sqrt +from math import (sqrt, pi as PI) def resonant_frequency(inductance: float, capacitance: float) -> tuple: From bfae1599ca0d8c06a65ca06845850bec8f3f38ac Mon Sep 17 00:00:00 2001 From: Shashank Kashyap <50551759+SKVKPandey@users.noreply.github.com> Date: Sat, 15 Oct 2022 09:40:14 +0530 Subject: [PATCH 05/24] Update electronics/resonant_frequency.py Co-authored-by: Caeden --- electronics/resonant_frequency.py | 1 - 1 file changed, 1 deletion(-) diff --git a/electronics/resonant_frequency.py b/electronics/resonant_frequency.py index 0fa245697af6..6f494b329406 100644 --- a/electronics/resonant_frequency.py +++ b/electronics/resonant_frequency.py @@ -5,7 +5,6 @@ def resonant_frequency(inductance: float, capacitance: float) -> tuple: - """ This function can calculate the resonant frequency of LC circuit, for the given value of inductance and capacitnace. From 0ae38305b960b6f39b1b08532b48818569bb046b Mon Sep 17 00:00:00 2001 From: Shashank Kashyap <50551759+SKVKPandey@users.noreply.github.com> Date: Sat, 15 Oct 2022 09:40:32 +0530 Subject: [PATCH 06/24] Update electronics/resonant_frequency.py Co-authored-by: Caeden --- electronics/resonant_frequency.py | 1 + 1 file changed, 1 insertion(+) diff --git a/electronics/resonant_frequency.py b/electronics/resonant_frequency.py index 6f494b329406..5f258b540dad 100644 --- a/electronics/resonant_frequency.py +++ b/electronics/resonant_frequency.py @@ -39,3 +39,4 @@ def resonant_frequency(inductance: float, capacitance: float) -> tuple: import doctest doctest.testmod() + From ed30f58b1b19ab676345bbad7f64cc12ba84d294 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 15 Oct 2022 04:12:25 +0000 Subject: [PATCH 07/24] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- electronics/resonant_frequency.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/electronics/resonant_frequency.py b/electronics/resonant_frequency.py index 5f258b540dad..e900d5fc2da7 100644 --- a/electronics/resonant_frequency.py +++ b/electronics/resonant_frequency.py @@ -1,7 +1,8 @@ # https://en.wikipedia.org/wiki/LC_circuit from __future__ import annotations -from math import (sqrt, pi as PI) +from math import pi as PI +from math import sqrt def resonant_frequency(inductance: float, capacitance: float) -> tuple: @@ -39,4 +40,3 @@ def resonant_frequency(inductance: float, capacitance: float) -> tuple: import doctest doctest.testmod() - From ab0d6ebe08e9613b57738dad54bd1d8ee6773064 Mon Sep 17 00:00:00 2001 From: Shashank Kashyap <50551759+SKVKPandey@users.noreply.github.com> Date: Sat, 15 Oct 2022 23:01:02 +0530 Subject: [PATCH 08/24] Updated resonant_frequency.py --- electronics/resonant_frequency.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/electronics/resonant_frequency.py b/electronics/resonant_frequency.py index e900d5fc2da7..6767bf05f826 100644 --- a/electronics/resonant_frequency.py +++ b/electronics/resonant_frequency.py @@ -1,8 +1,7 @@ # https://en.wikipedia.org/wiki/LC_circuit from __future__ import annotations -from math import pi as PI -from math import sqrt +from math import (sqrt, pi) def resonant_frequency(inductance: float, capacitance: float) -> tuple: @@ -32,7 +31,7 @@ def resonant_frequency(inductance: float, capacitance: float) -> tuple: else: return ( "resonant_frequency", - float(1 / (2 * PI * (sqrt(inductance * capacitance)))), + float(1 / (2 * pi * (sqrt(inductance * capacitance)))), ) From c571d5646f6c9d3a4a614e6dac098b3eef87141a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 15 Oct 2022 17:31:57 +0000 Subject: [PATCH 09/24] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- electronics/resonant_frequency.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/electronics/resonant_frequency.py b/electronics/resonant_frequency.py index 6767bf05f826..9edba2739bcc 100644 --- a/electronics/resonant_frequency.py +++ b/electronics/resonant_frequency.py @@ -1,7 +1,7 @@ # https://en.wikipedia.org/wiki/LC_circuit from __future__ import annotations -from math import (sqrt, pi) +from math import pi, sqrt def resonant_frequency(inductance: float, capacitance: float) -> tuple: From da21dcfbfeb51c62c3a671cd1cd1295198f34a86 Mon Sep 17 00:00:00 2001 From: Shashank Kashyap <50551759+SKVKPandey@users.noreply.github.com> Date: Wed, 19 Oct 2022 08:56:52 +0530 Subject: [PATCH 10/24] Update electronics/resonant_frequency.py Co-authored-by: Paul <56065602+ZeroDayOwl@users.noreply.github.com> --- electronics/resonant_frequency.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/electronics/resonant_frequency.py b/electronics/resonant_frequency.py index 9edba2739bcc..ff8fd1b674b8 100644 --- a/electronics/resonant_frequency.py +++ b/electronics/resonant_frequency.py @@ -30,7 +30,7 @@ def resonant_frequency(inductance: float, capacitance: float) -> tuple: else: return ( - "resonant_frequency", + "Resonant frequency", float(1 / (2 * pi * (sqrt(inductance * capacitance)))), ) From d4a1a5b6701649fb90719dd943edce315ec6303f Mon Sep 17 00:00:00 2001 From: Shashank Kashyap <50551759+SKVKPandey@users.noreply.github.com> Date: Wed, 19 Oct 2022 09:07:34 +0530 Subject: [PATCH 11/24] Fixed doctest issues in resonant_frequency.py --- electronics/resonant_frequency.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/electronics/resonant_frequency.py b/electronics/resonant_frequency.py index ff8fd1b674b8..bc17537a2fc1 100644 --- a/electronics/resonant_frequency.py +++ b/electronics/resonant_frequency.py @@ -19,7 +19,7 @@ def resonant_frequency(inductance: float, capacitance: float) -> tuple: ... ValueError: Capacitance cannot be 0 or negative >>> resonant_frequency(inductance=10, capacitance=5) - ('resonant_frequency', 0.022507907903927652) + ('Resonant frequency', 0.022507907903927652) """ if inductance <= 0: From aec3c3860b0b0237f28a538d01b34d7b1dedb935 Mon Sep 17 00:00:00 2001 From: Shashank Kashyap <50551759+SKVKPandey@users.noreply.github.com> Date: Thu, 20 Oct 2022 09:04:15 +0530 Subject: [PATCH 12/24] Algorithm for Electrical Impedance --- electronics/electrical_impedance.py | 38 +++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 electronics/electrical_impedance.py diff --git a/electronics/electrical_impedance.py b/electronics/electrical_impedance.py new file mode 100644 index 000000000000..b74cce0f899e --- /dev/null +++ b/electronics/electrical_impedance.py @@ -0,0 +1,38 @@ +# https://en.wikipedia.org/wiki/Electrical_impedance +from __future__ import annotations + +from math import (sqrt, pow) + + +def electrical_impedance(resistance: float, reactance: float, impedance: float) -> dict[str, float]: + """ + Apply Electrical Impedance formula, on any two given electrical values, which can be resistance, reactance, + and impedance, and then in a Python dict return name/value pair of the zero value. + + >>> electrical_impedance(3,4,0) + {'impedance': 5.0} + >>> electrical_impedance(0,4,5) + {'resistance': 3.0} + >>> electrical_impedance(3,0,5) + {'reactance': 4.0} + >>> electrical_impedance(3,4,5) + Traceback (most recent call last): + ... + ValueError: One and only one argument must be 0 + """ + if (resistance, reactance, impedance).count(0) != 1: + raise ValueError("One and only one argument must be 0") + if resistance == 0: + return {"resistance": sqrt(pow(impedance,2)-pow(reactance,2))} + elif reactance == 0: + return {"reactance": sqrt(pow(impedance,2)-pow(resistance,2))} + elif impedance == 0: + return {"impedance": sqrt(pow(resistance,2)+pow(reactance,2))} + else: + raise ValueError("Exactly one argument must be 0") + + +if __name__ == "__main__": + import doctest + + doctest.testmod() \ No newline at end of file From e45e47c1533e251349db495e36cda6f71a0bd6d9 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 20 Oct 2022 03:36:37 +0000 Subject: [PATCH 13/24] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- electronics/electrical_impedance.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/electronics/electrical_impedance.py b/electronics/electrical_impedance.py index b74cce0f899e..6f114c59cfc9 100644 --- a/electronics/electrical_impedance.py +++ b/electronics/electrical_impedance.py @@ -1,14 +1,16 @@ # https://en.wikipedia.org/wiki/Electrical_impedance from __future__ import annotations -from math import (sqrt, pow) +from math import pow, sqrt -def electrical_impedance(resistance: float, reactance: float, impedance: float) -> dict[str, float]: +def electrical_impedance( + resistance: float, reactance: float, impedance: float +) -> dict[str, float]: """ Apply Electrical Impedance formula, on any two given electrical values, which can be resistance, reactance, and impedance, and then in a Python dict return name/value pair of the zero value. - + >>> electrical_impedance(3,4,0) {'impedance': 5.0} >>> electrical_impedance(0,4,5) @@ -23,11 +25,11 @@ def electrical_impedance(resistance: float, reactance: float, impedance: float) if (resistance, reactance, impedance).count(0) != 1: raise ValueError("One and only one argument must be 0") if resistance == 0: - return {"resistance": sqrt(pow(impedance,2)-pow(reactance,2))} + return {"resistance": sqrt(pow(impedance, 2) - pow(reactance, 2))} elif reactance == 0: - return {"reactance": sqrt(pow(impedance,2)-pow(resistance,2))} + return {"reactance": sqrt(pow(impedance, 2) - pow(resistance, 2))} elif impedance == 0: - return {"impedance": sqrt(pow(resistance,2)+pow(reactance,2))} + return {"impedance": sqrt(pow(resistance, 2) + pow(reactance, 2))} else: raise ValueError("Exactly one argument must be 0") @@ -35,4 +37,4 @@ def electrical_impedance(resistance: float, reactance: float, impedance: float) if __name__ == "__main__": import doctest - doctest.testmod() \ No newline at end of file + doctest.testmod() From 0d729283439b8512d04b8b676301dc9c80cd58f4 Mon Sep 17 00:00:00 2001 From: Shashank Kashyap <50551759+SKVKPandey@users.noreply.github.com> Date: Thu, 20 Oct 2022 09:16:51 +0530 Subject: [PATCH 14/24] Updated Algorithm for Electrical Impedance --- electronics/electrical_impedance.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/electronics/electrical_impedance.py b/electronics/electrical_impedance.py index 6f114c59cfc9..5b169999f023 100644 --- a/electronics/electrical_impedance.py +++ b/electronics/electrical_impedance.py @@ -8,8 +8,9 @@ def electrical_impedance( resistance: float, reactance: float, impedance: float ) -> dict[str, float]: """ - Apply Electrical Impedance formula, on any two given electrical values, which can be resistance, reactance, - and impedance, and then in a Python dict return name/value pair of the zero value. + Apply Electrical Impedance formula, on any two given electrical values, + which can be resistance, reactance, and impedance, and then in a Python dict + return name/value pair of the zero value. >>> electrical_impedance(3,4,0) {'impedance': 5.0} From 524cf41a609047dae818675b38f75ff13ab2a7a6 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 20 Oct 2022 03:47:56 +0000 Subject: [PATCH 15/24] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- electronics/electrical_impedance.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/electronics/electrical_impedance.py b/electronics/electrical_impedance.py index 5b169999f023..0c668b4b6946 100644 --- a/electronics/electrical_impedance.py +++ b/electronics/electrical_impedance.py @@ -8,8 +8,8 @@ def electrical_impedance( resistance: float, reactance: float, impedance: float ) -> dict[str, float]: """ - Apply Electrical Impedance formula, on any two given electrical values, - which can be resistance, reactance, and impedance, and then in a Python dict + Apply Electrical Impedance formula, on any two given electrical values, + which can be resistance, reactance, and impedance, and then in a Python dict return name/value pair of the zero value. >>> electrical_impedance(3,4,0) From bba6342d832b3f176c006dd0453b982658aa3e1c Mon Sep 17 00:00:00 2001 From: Shashank Kashyap <50551759+SKVKPandey@users.noreply.github.com> Date: Sat, 22 Oct 2022 10:30:47 +0530 Subject: [PATCH 16/24] Update resonant_frequency.py --- electronics/resonant_frequency.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/electronics/resonant_frequency.py b/electronics/resonant_frequency.py index bc17537a2fc1..79ef6e81dc7f 100644 --- a/electronics/resonant_frequency.py +++ b/electronics/resonant_frequency.py @@ -10,6 +10,8 @@ def resonant_frequency(inductance: float, capacitance: float) -> tuple: for the given value of inductance and capacitnace. Examples are given below: + >>> resonant_frequency(inductance=10, capacitance=5) + ('Resonant frequency', 0.022507907903927652) >>> resonant_frequency(inductance=0, capacitance=5) Traceback (most recent call last): ... @@ -18,8 +20,6 @@ def resonant_frequency(inductance: float, capacitance: float) -> tuple: Traceback (most recent call last): ... ValueError: Capacitance cannot be 0 or negative - >>> resonant_frequency(inductance=10, capacitance=5) - ('Resonant frequency', 0.022507907903927652) """ if inductance <= 0: From bf1538cae742f1b2e3087d3eee1c4f47dc368ecc Mon Sep 17 00:00:00 2001 From: Shashank Kashyap <50551759+SKVKPandey@users.noreply.github.com> Date: Sat, 22 Oct 2022 10:49:29 +0530 Subject: [PATCH 17/24] Update electrical_impedance.py --- electronics/electrical_impedance.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/electronics/electrical_impedance.py b/electronics/electrical_impedance.py index 0c668b4b6946..a5e0a3c4c098 100644 --- a/electronics/electrical_impedance.py +++ b/electronics/electrical_impedance.py @@ -1,4 +1,9 @@ # https://en.wikipedia.org/wiki/Electrical_impedance + +"""Electrical impedance is the measure of the opposition that a +circuit presents to a current when a voltage is applied. +Impedance extends the concept of resistance to alternating current (AC) circuits.""" + from __future__ import annotations from math import pow, sqrt From 5122597a5a77a8e82c50ff9e0ce603792ce6f2e7 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 22 Oct 2022 05:20:25 +0000 Subject: [PATCH 18/24] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- electronics/electrical_impedance.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/electronics/electrical_impedance.py b/electronics/electrical_impedance.py index a5e0a3c4c098..0dc8c750039e 100644 --- a/electronics/electrical_impedance.py +++ b/electronics/electrical_impedance.py @@ -1,7 +1,7 @@ # https://en.wikipedia.org/wiki/Electrical_impedance -"""Electrical impedance is the measure of the opposition that a -circuit presents to a current when a voltage is applied. +"""Electrical impedance is the measure of the opposition that a +circuit presents to a current when a voltage is applied. Impedance extends the concept of resistance to alternating current (AC) circuits.""" from __future__ import annotations From a737543e181103dc054b6d723e3bae10c279fd09 Mon Sep 17 00:00:00 2001 From: Shashank Kashyap <50551759+SKVKPandey@users.noreply.github.com> Date: Sat, 22 Oct 2022 10:51:33 +0530 Subject: [PATCH 19/24] Update resonant_frequency.py --- electronics/resonant_frequency.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/electronics/resonant_frequency.py b/electronics/resonant_frequency.py index 79ef6e81dc7f..9cf5e3106fc2 100644 --- a/electronics/resonant_frequency.py +++ b/electronics/resonant_frequency.py @@ -1,4 +1,11 @@ # https://en.wikipedia.org/wiki/LC_circuit + +"""An LC circuit, also called a resonant circuit, tank circuit, or tuned circuit, +is an electric circuit consisting of an inductor, represented by the letter L, +and a capacitor, represented by the letter C, connected together. +The circuit can act as an electrical resonator, an electrical analogue of a +tuning fork, storing energy oscillating at the circuit's resonant frequency.""" + from __future__ import annotations from math import pi, sqrt From 75bf82a7e69bd6b47d8896958ceb3dd384a814eb Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 22 Oct 2022 05:22:27 +0000 Subject: [PATCH 20/24] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- electronics/resonant_frequency.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/electronics/resonant_frequency.py b/electronics/resonant_frequency.py index 9cf5e3106fc2..9c72255f6ff6 100644 --- a/electronics/resonant_frequency.py +++ b/electronics/resonant_frequency.py @@ -1,9 +1,9 @@ # https://en.wikipedia.org/wiki/LC_circuit -"""An LC circuit, also called a resonant circuit, tank circuit, or tuned circuit, -is an electric circuit consisting of an inductor, represented by the letter L, -and a capacitor, represented by the letter C, connected together. -The circuit can act as an electrical resonator, an electrical analogue of a +"""An LC circuit, also called a resonant circuit, tank circuit, or tuned circuit, +is an electric circuit consisting of an inductor, represented by the letter L, +and a capacitor, represented by the letter C, connected together. +The circuit can act as an electrical resonator, an electrical analogue of a tuning fork, storing energy oscillating at the circuit's resonant frequency.""" from __future__ import annotations From 342951971708bc58e274282799feb71e05d0ef10 Mon Sep 17 00:00:00 2001 From: Shashank Kashyap <50551759+SKVKPandey@users.noreply.github.com> Date: Sat, 22 Oct 2022 20:25:49 +0530 Subject: [PATCH 21/24] Update electronics/electrical_impedance.py Co-authored-by: Paul <56065602+ZeroDayOwl@users.noreply.github.com> --- electronics/electrical_impedance.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/electronics/electrical_impedance.py b/electronics/electrical_impedance.py index 0dc8c750039e..0faa74e1db52 100644 --- a/electronics/electrical_impedance.py +++ b/electronics/electrical_impedance.py @@ -2,7 +2,9 @@ """Electrical impedance is the measure of the opposition that a circuit presents to a current when a voltage is applied. -Impedance extends the concept of resistance to alternating current (AC) circuits.""" +Impedance extends the concept of resistance to alternating current (AC) circuits. +Source: https://en.wikipedia.org/wiki/Electrical_impedance +""" from __future__ import annotations From b3af034e3df5352d8c21a19ad20549106b993abf Mon Sep 17 00:00:00 2001 From: Shashank Kashyap <50551759+SKVKPandey@users.noreply.github.com> Date: Sat, 22 Oct 2022 20:26:19 +0530 Subject: [PATCH 22/24] Update electronics/electrical_impedance.py Co-authored-by: Paul <56065602+ZeroDayOwl@users.noreply.github.com> --- electronics/electrical_impedance.py | 1 - 1 file changed, 1 deletion(-) diff --git a/electronics/electrical_impedance.py b/electronics/electrical_impedance.py index 0faa74e1db52..8eaebeb5d8e7 100644 --- a/electronics/electrical_impedance.py +++ b/electronics/electrical_impedance.py @@ -1,4 +1,3 @@ -# https://en.wikipedia.org/wiki/Electrical_impedance """Electrical impedance is the measure of the opposition that a circuit presents to a current when a voltage is applied. From 7aeebc7d4bfd6f97ef0ce4ddfce59069ccfac2e5 Mon Sep 17 00:00:00 2001 From: Shashank Kashyap <50551759+SKVKPandey@users.noreply.github.com> Date: Sat, 22 Oct 2022 20:26:37 +0530 Subject: [PATCH 23/24] Update electronics/resonant_frequency.py Co-authored-by: Paul <56065602+ZeroDayOwl@users.noreply.github.com> --- electronics/resonant_frequency.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/electronics/resonant_frequency.py b/electronics/resonant_frequency.py index 9c72255f6ff6..4f95043b600a 100644 --- a/electronics/resonant_frequency.py +++ b/electronics/resonant_frequency.py @@ -4,7 +4,9 @@ is an electric circuit consisting of an inductor, represented by the letter L, and a capacitor, represented by the letter C, connected together. The circuit can act as an electrical resonator, an electrical analogue of a -tuning fork, storing energy oscillating at the circuit's resonant frequency.""" +tuning fork, storing energy oscillating at the circuit's resonant frequency. +Source: https://en.wikipedia.org/wiki/LC_circuit +""" from __future__ import annotations From bb292dca7584b0b7e9daa2fb999cf793cb07d746 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 22 Oct 2022 14:57:30 +0000 Subject: [PATCH 24/24] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- electronics/electrical_impedance.py | 1 - 1 file changed, 1 deletion(-) diff --git a/electronics/electrical_impedance.py b/electronics/electrical_impedance.py index 8eaebeb5d8e7..44041ff790b6 100644 --- a/electronics/electrical_impedance.py +++ b/electronics/electrical_impedance.py @@ -1,4 +1,3 @@ - """Electrical impedance is the measure of the opposition that a circuit presents to a current when a voltage is applied. Impedance extends the concept of resistance to alternating current (AC) circuits.