Exemple #1
0
from Person import Person
from ChairStructure import ChairStructure, Chair
from Exceptions import SelectionError
from Sort import Sort
from BinarySearchTree import BinarySearchTree


# prints new line 30 times to clear the console view
def clear_screen():
    print('\n' * 30)

# builds a new structure with the people from save file
people = Person.load_from_file()
my_structure = ChairStructure.build_from_list_of_people(people)


running = True


def remove_person():
    # asks user to select which trait to sort by
    print('\nWhich of the following traits would you like to search?\n')
    print("1.ID\n"
          "2.Name\n"
          "3.Age\n"
          "4.Personality Rating")
    print('\n')
    selection = input('Choice: ')

    # checks to make sure selection is valid option
    while True: