def AddWord(): doContinue = True myMenu = Menu() API = WordList() while doContinue: os.system("cls") myMenu.ShowTitle("Add a new word") wordToSearch = myMenu.RequestWord() myMenu.SearchMenu() os.system("cls") API.AddNewWord(wordToSearch) continueResp = myMenu.Continue("add another word") if continueResp == "n" or continueResp == "N": doContinue = False
def RemoveWord(): doContinue = True myMenu = Menu() API = WordList() while doContinue: os.system("cls") myMenu.ShowTitle("Remove word") wordToSearch = myMenu.RequestWord() myMenu.SearchMenu() os.system("cls") API.RemoveWord(wordToSearch) continueResp = myMenu.Continue("remove another word") if continueResp == "n" or continueResp == "N": doContinue = False
def GetExample(): doContinue = True myMenu = Menu() API = WordList() while doContinue: os.system("cls") myMenu.ShowTitle("Get Example") wordToSearch = myMenu.RequestWord() myMenu.SearchMenu() os.system("cls") API.GetExample(wordToSearch) continueResp = myMenu.Continue("search another example") if continueResp == "n" or continueResp == "N": doContinue = False