[mypy] fix small folders (#4292)

* add final else-statement

* fix file_transfer

* fix quantum folder

* fix divide_and_conquer-folder

* Update build.yml

* updating DIRECTORY.md

* Update ripple_adder_classic.py

* Update .github/workflows/build.yml

* removed imports from typing

* removed conversion to string

* Revert "removed conversion to string"

This reverts commit 2f7c4731d1.

* implemented suggested changes

* Update receive_file.py

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
This commit is contained in:
algobytewise
2021-03-23 21:21:50 +05:30
committed by GitHub
parent a8db5d4b93
commit 959507901a
8 changed files with 15 additions and 9 deletions

View File

@@ -42,6 +42,8 @@ def electric_power(voltage: float, current: float, power: float) -> Tuple:
return result("current", power / voltage)
elif power == 0:
return result("power", float(round(abs(voltage * current), 2)))
else:
raise ValueError("Exactly one argument must be 0")
if __name__ == "__main__":

View File

@@ -32,6 +32,8 @@ def ohms_law(voltage: float, current: float, resistance: float) -> Dict[str, flo
return {"current": voltage / resistance}
elif resistance == 0:
return {"resistance": voltage / current}
else:
raise ValueError("Exactly one argument must be 0")
if __name__ == "__main__":