Skip to content
Open
Changes from all commits
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
17 changes: 17 additions & 0 deletions src/verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,20 @@
#
# return 0;
# }


def verify():
try:
number = int(input("Insert a number to test if it's present in the secret array: "))
except:
print("Invalid input!")
return

arr=[1,4,6,8,3,8,11,12,-4]
for i in arr:
if number == i:
print("The number is in the array")
return
print("The number is NOT in the array")

verify()
Loading