Computers and Technology
Computers and Technology, 01.11.2020 19:30, Qxeen9163

1 N
def find_item(list, item):
#Returns True if the item is in the list, False if not.
if len(list) = 0 :
return False
==
3
4
5
6
7
#Is the item in the center of the list?
middle = len(list)//2
if list[middle] == item:
return True
8
9
10
11
12
13
14
15
16
17
18
19
#Is the item in the first half of the list?
if item < list[middle]:
#Call the function with the first half of the list
return find_item(list[:middle], item)
else:
#Call the function with the second half of the list
return find_item(list[middle+1:], item)
return false
20
21
#Do not edit below this line - This code helps check your work!
list_of_names = ["Parker", "Drew", "Cameron", "Logan", "Alex", "Chris", "Terry", "Jamie", "
22
23

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 09:40, cutybrain6054
Sarah is having a hard time finding a template for her advertising business that she may be able to use at a later date and also make it available to her colleagues
Answers: 1
image
Computers and Technology, 22.06.2019 20:00, random286
How is the number 372 written when expanded out to place values in the base 8 (octal) number system? a. 2 x 4 + 3 x 2 + 4 x 1 b. 3 x 64 + 7 x 8 + 2 x 1 c. 3 x 8 + 7 x 7 + 2 x 6 d. 3 x 100 + 7 x 10 + 2 x 1
Answers: 1
image
Computers and Technology, 23.06.2019 01:50, rhonda45801
Free points just awnser this. what should i watch on netflix
Answers: 2
image
Computers and Technology, 23.06.2019 03:00, Julianhooks
State 7 common key's for every keyboard
Answers: 1