Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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.
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 == NoneStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started