Complete the code to assign the variable that stores the original data size.
original_size = [1]The len(data) function returns the size of the original data in bytes or characters.
Complete the code to calculate the compression ratio correctly.
compression_ratio = [1] / original_sizeThe compression ratio is calculated by dividing the compressed data size by the original data size.
Fix the error in the code to decompress data using the correct method.
decompressed_data = compressed_data.[1]()The method to restore original data from compressed data is decompress().
Fill both blanks to create a dictionary comprehension that maps each word to its compressed length if the length is less than 5.
{word: len(word)[1] for word in words if len(word) [2] 5}The first blank uses **2 to square the length, and the second blank uses < to filter words shorter than 5 characters.
Fill all three blanks to create a dictionary comprehension that maps the uppercase word to its length if the length is greater than 3.
result = {{ [1]: [2] for word in words if len(word) [3] 3 }}The dictionary keys are uppercase words using word.upper(), values are their lengths with len(word), and the filter uses > to select words longer than 3 characters.