Answered step by step
Verified Expert Solution
Link Copied!

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.

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Seven Databases In Seven Weeks A Guide To Modern Databases And The NoSQL Movement

Authors: Luc Perkins, Eric Redmond, Jim Wilson

2nd Edition

1680502530, 978-1680502534

More Books

Students also viewed these Databases questions

Question

=+C&B (especially taxation) laws, regulations, and practices?

Answered: 1 week ago