Open acbart opened 3 years ago
Hi Professor, I practiced list comprehension using many of the functions in that repo, but I could not figure out how to implement unit testing using the jupyter notebook. Is there a special way that it has to be done or am I overthinking it probably?
You said you couldn't figure out how to do it - what have you tried? What didn't work?
https://medium.com/@vladbezden/using-python-unittest-in-ipython-or-jupyter-732448724e31
I found this website which helped me get rid of the first error that I was having but now it is saying that none of my functions are defined, do I have to add something to the class for it to recognize it?
Looks like you're feeling pretty confident with a lot of Python, so we're off to a good start! Top priorities seem to be:
For practice problems, I found this repo here with some promising looking ones related to List Comprehensions. Pick a half dozen and try them out. This is also a good chance to practice writing unit tests in Python; they use the
doctest
format (where the test case is embedded directly in the documentation), but it'd be good to rewrite them in theunittest
style. And even more bonus points, that let's you practice writing a class too!Spending some time on Lambdas is not a waste, since they end up being useful with Pandas sometimes. Lambdas are a scary word for a simple concept - a function that you don't have to name. This page is a quick overview, but if you have the time then reading this page seems like it'd be very informative.