Answered step by step
Verified Expert Solution
Question
1 Approved Answer
pyhon fix count_longest.py to pass count_longest_test.py MI count_longest.py 1 # MODIFY ME TO IMPLEMENT YOUR SOLUTION 2 # TO PROBLEM 4: COUNT THE LONGEST SUBSEQUENCE
pyhon
fix count_longest.py to pass count_longest_test.py
MI count_longest.py 1 # MODIFY ME TO IMPLEMENT YOUR SOLUTION 2 # TO PROBLEM 4: COUNT THE LONGEST SUBSEQUENCE 3 # 4 # NAME: FIXME # ASSIGNMENT: Technical HW: Stacks & Queues 6 7 def count_longest(9): 8 len = 0 9 5 6 00 10 11 return len 12 E def main(): 13 print("out 2:", count_longest( Queue ([ 1 for 1 in michelle rende 14 print("out 5:", count_longest(Queue ([1 for l in "m". * 51222 15 print("out 3:", count_longest(Queue ([1 for 1 in "heee" 2012 16 17 18 # Don't run main on import 19 if _name_ __main__": 20 | main() 21 22 I' 2 3 00 count_longest_test.py 1 # TEST FILE FOR COUNT LONGEST SUBSEQUENCE 2. # DO NOT MODIFY 3 4 from Queue import Queue 5 from count_longest import count_longest| 6 7 def test_count_hello(): 8 assert count_longest( Queue [ 1 for 1 in "hello" ] ) ) == 2 9 10 def test_count_m5(): 11 assert count_longest(Queue ([1 for 1 in "m" * 5])) == 5 12 13 def test_count_03(): 14 assert count_longest(Queue ([1 for 1 in "hooop"])) == 3 15 16 def test_count_04(): assert count_longest(Queue ([1 for 1 in "oooohh"])) == 4 18 def test_count_oe4(): 20 assert count_longest(Queue ([1 for 1 in "oooohheeee"] )) == 4 21 17 19Step 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