Python Programing

****Assignment #4 Makeup – Instead of in-fix notation for our maybe-probably logic language, you should implement the parse, evaluate, and print functions to work with pre-fix notation. The input strings will now be of the form, s = ‘ AND T M_0.5 ‘, and will not need parentheses. 

General structure of your make-up assignment (regardless of which one) should be as follows:

import unittest


class YourClass:
    """
    YOUR CLASS DOCUMENTATAION
    """

    def __init__(self, size):
        """ INSERT COMMMENTS (IN YOUR OWN WORDS) """
        pass

    # ADD YOUR OTHER METHODS HERE...


def YourFunctionA:
    """ DOCUMENTATION FOR THIS FUNCTION """
    pass

    # ADD YOUR OTHER FUNCTIONS HERE (IF NEEDED)...


class TestYourClassOrFuctions(unittest.TestCase):

    def testMethodA(self):
        """ INSERT DESCRIPTION OF WHAT THIS TEST IS CHECKING.. """
        pass

    # ADD MORE TESTS TO CHECK YOUR OTHER CLASSES/METHODS/FUNTIONS WORK


# main() - run any example/demo you want to when running as standalone program
def main():
    pass

# unittest_main() - run unittest's main, which will run TestHashTable's methods
def unittest_main():
    unittest.main()

# evaluates to true if run as standalone program
if __name__ == '__main__':
    main()
    unittest_main()

PreviousNext

Tags: No tags