Question: I need help with Part III: Code Testing. In [20]: # edit code style for this function def end_chat(i): if 'quit' in i:o='Bye'; = False
I need help with Part III: Code Testing.
![I need help with Part III: Code Testing. In [20]: \# edit](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f3085248152_40966f308519f136.jpg)
In [20]: \# edit code style for this function def end_chat(i): if 'quit' in i:o='Bye'; = False else:o=None; = True return 0,c In [21]: \# your code here def end_chat (i) : if 'quit' in i:0= Bye' ,c=False else: 0= None; c= True return 0,C In [22]: \# execute function end_chat('I want to quit') Out [22]: ('Bye', False) In [23]: \# execute function \# store output in two separate variables output, chat = end_chat('I want to quit') print(output, chat) Bye False Part III: Code Testing After editing the function above, write a test function test_get_most_common ( ) that will test the functionality of the get_most_common function above. Note: you'll likely need to create a dummy dataframe within the function In [ ]: \# your code here raise NotimplementedError In [ ]: \# should pass silently \# when you execute test test_get_most_common() In [ ] : \# call test function In [ ] : \# call test function out = test_get_most_common() \# out should store none if passes silently assert out == None In [20]: \# edit code style for this function def end_chat(i): if 'quit' in i:o='Bye'; = False else:o=None; = True return 0,c In [21]: \# your code here def end_chat (i) : if 'quit' in i:0= Bye' ,c=False else: 0= None; c= True return 0,C In [22]: \# execute function end_chat('I want to quit') Out [22]: ('Bye', False) In [23]: \# execute function \# store output in two separate variables output, chat = end_chat('I want to quit') print(output, chat) Bye False Part III: Code Testing After editing the function above, write a test function test_get_most_common ( ) that will test the functionality of the get_most_common function above. Note: you'll likely need to create a dummy dataframe within the function In [ ]: \# your code here raise NotimplementedError In [ ]: \# should pass silently \# when you execute test test_get_most_common() In [ ] : \# call test function In [ ] : \# call test function out = test_get_most_common() \# out should store none if passes silently assert out == None
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
