Skip to content

Commit 7dcd57b

Browse files
authored
Merge pull request #5 from TheAlgorithms/master
sync fork
2 parents 8467a83 + 8e488dd commit 7dcd57b

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

electronics/electric_power.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# https://en.m.wikipedia.org/wiki/Electric_power
22
from collections import namedtuple
3+
from typing import Tuple
34

45

5-
def electric_power(voltage: float, current: float, power: float) -> float:
6+
def electric_power(voltage: float, current: float, power: float) -> Tuple:
67
"""
78
This function can calculate any one of the three (voltage, current, power),
89
fundamental value of electrical system.

electronics/ohms_law.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# https://en.wikipedia.org/wiki/Ohm%27s_law
2+
from typing import Dict
23

34

4-
def ohms_law(voltage: float, current: float, resistance: float) -> float:
5+
def ohms_law(voltage: float, current: float, resistance: float) -> Dict[str, float]:
56
"""
67
Apply Ohm's Law, on any two given electrical values, which can be voltage, current,
78
and resistance, and then in a Python dict return name/value pair of the zero value.

web_programming/covid_stats_via_xpath.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from collections import namedtuple
88

99
import requests
10-
from lxml import html
10+
from lxml import html # type: ignore
1111

1212
covid_data = namedtuple("covid_data", "cases deaths recovered")
1313

0 commit comments

Comments
 (0)