I&C SCI 31 Lecture Notes - Lecture 11: Larb
Document Summary
The user interface is the other part, called the view. The view let"s us see stuff working from the beginning. It"s instant gratification, so we"ll start here from collections import namedtuple # it"s customary to do this at the top. #view (user interface) portion of the program def restaurants() -> none: """main program, starts and finishes up""" print ("welcome to the restaurants program") print() our_diners = [ ] # this our collection of restaurants our_diners = handle_commands (our_diners) # do everything. ## for now we are just going to throw that list away. ## to a file so that we can start next time. ## where we left offf print() print ("thank you. """print (collection_to_str (collection_search_by_name ( diner_list, name)))""" else: print ("you entered illegal action " + command, + Restaurant = namedtuple ("restaurant", "name cuisine phone dish price") # create a few restaurants for testing diner1 = restaurant ("taileven", "french", "01-22-33-44-55",