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 8189f28
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/verify.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
def verify(l:list[int], v:int ) -> bool:
for x in l:
if x == v:
return True
return False
5 changes: 5 additions & 0 deletions tests/test_verify.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
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 8189f28

Please sign in to comment.