Skip to content

Updated doctests for nor_gate #10791

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Oct 22, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
added other possible cases
  • Loading branch information
= committed Oct 21, 2023
commit 3ceb9fbb57cc423d350e81d831e9d0682a818a27
9 changes: 9 additions & 0 deletions boolean_algebra/nor_gate.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@ def nor_gate(input_1: int, input_2: int) -> int:
1
>>> nor_gate(0, -7)
0
>>> nor_gate(0, 2)
0
>>> nor_gate(-3, 0)
0
>>> nor_gate(0.0, 1.0)
0
>>> nor_gate(1.5, 0)
0
>>> nor_gate(0, -2.5)
"""
return int(input_1 == input_2 == 0)

Expand Down