Skip to content

Commit

Permalink
feat:new version of function verify
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzodidomenic committed Nov 20, 2023
1 parent 96bfb5c commit a742dad
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions src/verify.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
N = [1,2,3,4,5,6,7,8,9]

def f(A:list,k:int)->bool:
if (k in A):
return True
else:
return False
return k in A


print("insert a number")
k = int(input())
def insert_number()->int:
print("insert a number")
k = int(input())
return k

if((f(N,k))==True):
print("number is in the list")
else:
print("number is not in the list")
k = 0

if __name__ == "__main__":
k = insert_number()
if((f(N,k) is True)):
print("number is in the list")
else:
print("number is not in the list")

0 comments on commit a742dad

Please sign in to comment.