IDE: visual studio
specifically do it using unittest and screen recording while
compiling and running the program is also required/nWrite a series of tests for one of your homework assignments
using the unittest package. These tests can be written for any
upcoming homework assignment. I have provided example files for a
simulated homework assignment (example_hw.py) and test cases for
that assignment (tests.py). In order to run the tests, you will
need to ensure both files are saved in the same directory on your
computer, then from the terminal, use the command:
python3 m unittest tests.py -v
Obviously, change the file name in the command if you name your
tests file something else. The -v flag is optional and stands for
verbose, to indicate that the code will output more detailed
information if any of the tests fail. Your final submission
should indicate which homework assignment the tests are written
for, and all of your tests should pass. However, as you're
working on it, I recommend trying out a few tests that you know
will fail just so you can see what happens to the output when
your tests fail.
(60%) We've talked about various data structures in this class,
such as lists, dictionaries, and tuples. However, if existing
Python data structures don't suit your needs, you can actually
create your very own data structure. For this part of the extra
credit, you need to create your own data structure called a
stack. This can be implemented using a python list, although you
do not have to use a list-based implementation. When you create
your own data structure, you create a class, then define methods
for that class. Each class must have an
method that
tells Python what to do when an instance of that class is
created. You can also reference built-in methods that Python has.
For example, if you create a method called str, that will
init
to print vour data
tell Pvthon what to return when vou attempt
student's notes
Fig: 1
Fig: 2