Что не так в этом коде (Python): from collections import deque

graph = {}

graph ["you"] = ["alice", "bob", "claire"]

graph ["bob] = ["anuj", "peggy"]

graph ["alice"] = ["peggy"]

graph ["claire"] = ["thom", "jonny"]

graph ["anuj"] = []

graph ["peggy"] = []

graph ["thom"] = []

graph ["jonny"] = []

def search (name):

search_queue = deque ()

search_queue += graph [name]

while search_queue:

person = search_queue.popleft ()

if not person_is_seller (person):

print (person + " is a mango seller!")

return True

else:

search_queue += graph [person]

searched.append (person)

return False

search ("you")

SuperPuper131 SuperPuper131    1   21.12.2020 08:28    1

Другие вопросы по теме Информатика