Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please help with writing the test case for the method __contains__ in LinkedList class. from typing import List from prep5 import Linkedlist, Node ## #

image text in transcribedimage text in transcribed

please help with writing the test case for the method __contains__ in LinkedList class.

from typing import List from prep5 import Linkedlist, Node ## # Part 2 # In this part of the prep, you are to write test cases for the contains # method # # We will have a correct version of prep5.py, as well as a version with an # undisclosed bug in the contains method. We will not give you hints as # to what the bug is, so test thoroughly! # # When you are done, run the automated self-test on Markus. If you pass the # test case named 'test_contains_test_cases': congratulations! You've found # the bug, and you're done with this part. # # You may write as many test cases as you want. However, your test cases must # fulfill the following requirements: - All of your tests must pass on our correct version of prep5.py - At least one of your tests must fail on the version with a bug. def contains (self, item: Any) -> bool: """Return whether is in this list. Use == to compare items. # Equivalent to lst. _contains (2) >>> lst = three_items (1, 2, 3) >>> 2 in lst True >>> 4 in lst False

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_2

Step: 3

blur-text-image_3

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

Beginning Microsoft SQL Server 2012 Programming

Authors: Paul Atkinson, Robert Vieira

1st Edition

1118102282, 9781118102282

More Books

Students also viewed these Databases questions

Question

=+j Explain the litigation risks in international labor relations.

Answered: 1 week ago

Question

What is DDL?

Answered: 1 week ago