Skip to content

Commit

Permalink
feat(verify.py): implemented function verify and its test
Browse files Browse the repository at this point in the history
  • Loading branch information
FilippoMarletta committed Nov 8, 2023
1 parent c446327 commit 7e8be4e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/verify.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
def verify(l:list[int], v:int ) -> bool:
for x in l:
if x == v:
return True
return False

6 changes: 6 additions & 0 deletions tests/test_verify.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from src.verify import verify

def test_verify() -> None:
assert verify([1,2,3], 2) == True
assert verify([1,2,3], 4) == False

0 comments on commit 7e8be4e

Please sign in to comment.