Question: Question 4a (2 points): Finding Edge Cases I This program is a partially correct solution to the winning streak problem from a previous lab. Given
Question 4a (2 points): Finding Edge Cases I
This program is a partially correct solution to the winning streak problem from a previous lab. Given a string, list, or tuple as input, find the longest winning streak. This solution contains an error. Find a test case that returns an incorrect value, or raises an error.
Do not modify or try to correct the code for this question, simply find a problematic input for the function

Question 4a (2 points): Finding Edge Cases l This program is a partially correct solution to the winning streak problem from a previous lab. Given a string, list, or tuple as input, find the longest winning streak. This solution contains an error. Find a test case that returns an incorrect value, or raises an error Do not modify or try to correct the code for this question, simply find a problematic input for the function In [39]: # Modify the value of this variable so that winningtreakBad produces incorrect output PROBLEM INPUT10 # Do not modify the code below this line def winningStreakBad(s): if type(s) not in (tuple, list, str): return 0 if len(s) == 0: return 0 111ns = 1 maxwins 1 for i in range(len(s)): if s[i]s[i-1]: wins += 1 else wins = 1 if wins > maxwins: maxwins Wins return maxwins In [40]: ## This is what the autograder will see : winningStreakBad (PROBLEM_INPUT1)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
