mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 17:34:49 +08:00
Pyupgrade to Python 3.9 (#4718)
* Pyupgrade to Python 3.9 * updating DIRECTORY.md Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
# https://en.wikipedia.org/wiki/Ohm%27s_law
|
||||
from typing import Dict
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
def ohms_law(voltage: float, current: float, resistance: float) -> Dict[str, float]:
|
||||
def ohms_law(voltage: float, current: float, resistance: float) -> dict[str, float]:
|
||||
"""
|
||||
Apply Ohm's Law, on any two given electrical values, which can be voltage, current,
|
||||
and resistance, and then in a Python dict return name/value pair of the zero value.
|
||||
|
Reference in New Issue
Block a user