Question: PLEASE CODE USING PYTHON 3! (PLEASE HELP ASAP) : Be sure to write clear comments throughout when coding this and make sure the code passes

PLEASE CODE USING PYTHON 3! (PLEASE HELP ASAP) :

Be sure to write clear comments throughout when coding this and make sure the code passes the unit test. Both images of the task and the unit test are attached below. I have also linked the actual '.py' files in you need them. I'm not sure but It may involve using tuples, sets, yields, dictionaries, lists, list comprehensions. Use those if possible. Make sure it isn't too advanced either; something that a person that's taking an intro to python course could do. Make it as simple as possible basically. Just use your better judgment please and thank you! For this question, you need to know how to create a function that's a generator.

PLEASE CODE USING PYTHON 3! (PLEASE HELP ASAP) : Be sure towrite clear comments throughout when coding this and make sure the codepasses the unit test. Both images of the task and the unit

Link to files: https://drive.google.com/drive/folders/1OnbNJVmq21GBonfSAFe4b4973t1sU6dF?usp=sharing?

# ass2-test.py UNITTEST # Testing Framework for Assigment 2 # usage: # # % python -m unittest ass2-test.py 5 6 8 from ass2 import colz_generate 10 import ass2 11 import unittest 13 # A subclass of unittest.TestCase 14 cLass Ass2Test (unittest.TestCase): 15 16 17 18 19 28 21 def test_collatz_5(self): gen colz-generate(5) nxt next(gen) nxt next (gen) nxt next (gen) self.assertEqual (nxt, 8) def test_collatz_6(self): 24 25 26 27 28 29 30 ifname 31 gen colz_generate(6) nxt next (gen) nxt next(gen) nxt next (gen) self.assertEqual (nxt, 10) -main unittest.main()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!