Complete the code to import the Mann-Whitney U test function from scipy.stats.
from scipy.stats import [1]
The correct function name is mannwhitneyu in scipy.stats.
Complete the code to perform the Mann-Whitney U test on two samples, sample1 and sample2.
stat, p = mannwhitneyu([1], sample2)The first sample to test must be sample1 as given in the instruction.
Fix the error in the code to correctly perform a two-sided Mann-Whitney U test.
stat, p = mannwhitneyu(sample1, sample2, alternative=[1])The correct string for a two-sided test in mannwhitneyu is 'two-sided'.
Fill both blanks to create a dictionary comprehension that maps each word to its length if the length is greater than 3.
{word: [1] for word in words if [2]The dictionary maps words to their lengths, so the value is len(word). The condition filters words with length greater than 3, so len(word) > 3 is correct.
Fill all three blanks to create a dictionary comprehension that maps each uppercase word to its length if the length is greater than 4.
{ [1]: [2] for word in words if [3] }word.lower() instead of uppercase for keys.word > 4.The key is the uppercase version of the word (word.upper()), the value is the length (len(word)), and the condition filters words longer than 4 characters (len(word) > 4).