Problem 1 b 7 c 4 d "buttermilk" e ['butter', 3, 'milk', 2, 'eggs', 12] f "cheddar-mozarella-feta" g ['Hell', 'W', 'rd'] h FALSE i TRUE j "cheddarcheddar" k 4 l 4.0 m 5 Problem 2 Many solutions possible for parts A and B. Part A: result = name[:2] + name[-3:] + name[3:6] Part B: result = word.join(songs[:2]) + word + songs[-1] Part C: ['Thinking Out Loud', 'Bad Habits', 'Happier', 'Shivers'] Part D: ['butter', 3, 'milk', 2, 'eggs', 12, ['cheddar', 'mozzarella', 'feta']] Problem 3 Part A: Line 18 Part B: Line 5 Part C: temps Part D: temperatures Part E: 60 Part F: 10 Part G: None Part H: It's hot! It's warm! It's cool! It's cool! It's cold! All done! Part I: Multiple solutions possible. 05 def check_temperature(temperatures): 06 print(temperatures) 07 for temp in temperatures: 08 if temp > 30: 09 print("It's hot!") 10 elif temp > 20: # changed to an elif 11 print("It's warm!") 12 elif temp > 10: # changed to an elif 13 print("It's cool!") 14 else: 15 print("It's cold!") Problem 4 Many solutions possible. import random def classify(animals): idx = random.randint(0, len(animals)-1) # Pick a random index position classifications = [] if animals[idx] in ["rabbit", "pigeon"]: classifications.append("Pet") classifications.append("Wild") elif animals[idx] in ["dog", "cat"]: classifications.append("Pet") elif animals[idx] in ["lion", "tiger", "elephant"]: classifications.append("Wild") else: classifications.append("Farm") return classifications Problem 5 Many solutions possible. def combine_words(lst_of_words, word): total_str = "" for curr_word in lst_of_words: total_str += curr_word + word return total_str[:-1] # remove last element Problem 6 Many solutions possible. def sum_of_nums(start, end): total = 0 for num in range(start, end + 1): if num % 3 == 0 or num % 5 == 0: # Check if divisible by 3 or 5 total += num # Accumulate the sum return total