Skip to content

Commit c5d7ae0

Browse files
author
pppprivacy
committed
Implemented verify
1 parent 69ee23c commit c5d7ae0

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/verify.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,20 @@
1616
#
1717
# return 0;
1818
# }
19+
20+
21+
def verify():
22+
try:
23+
number = int(input("Insert a number to test if it's present in the secret array: "))
24+
except:
25+
print("Invalid input!")
26+
return
27+
28+
arr=[1,4,6,8,3,8,11,12,-4]
29+
for i in arr:
30+
if number == i:
31+
print("The number is in the array")
32+
return
33+
print("The number is NOT in the array")
34+
35+
verify()

0 commit comments

Comments
 (0)