# Name # CSE 160 # Autumn 2025 # Coding Practice 3 # Problem 1 def replace_7_boom(): ''' Given nums, a list of numbers, write a function that replaces any multiple of 7 with the string "BOOM", then returns the modified list. You can assume any non-empty list will always contain integers. ''' # Write your code here ''' Examples: replace_7_boom([2, 3, 4, 5, 6]) is [2, 3, 4, 5, 6] replace_7_boom([8, 22, 24, 27]) is [8, 22, 24, 27] replace_7_boom([7]) is ["BOOM"] replace_7_boom([37, 23, 28]) is [37, 23, "BOOM"] replace_7_boom([]) is [] replace_7_boom([7, 14, 21]) is ["BOOM", "BOOM", "BOOM"] replace_7_boom([0, 10, 100]) is [0, 10, 100] ''' # Problem 2 def combine_list(): ''' Write a function, combine_list, that takes in two lists of integers (list1 and list2) and places all EVEN valued elements of list2 into list1. Then, return list1 with all the elements sorted in ascending order. Hint: use list functions! ''' # Write your code here ''' Examples: combine_list([1, 3], [5, 2]) returns [1, 2, 3] combine_list([3], [1]) returns [3] combine_list([8, 3], [1, 8, 7]) returns [3, 8, 8] combine_list([], [3, 5 ,7]) returns [] combine_list([3, 5, 7], [0, 0]) returns [0, 0, 3, 5, 7] ''' # Problem 3 def boom_7(): ''' Given nums, a list of numbers, function should return "BOOM" if any multiple of 7 is present in the list, otherwise, return "CLEAR". ''' # Write your code here ''' Examples: try_boom_7([2, 3, 4, 5, 6]) returns "CLEAR" try_boom_7([8, 22, 24, 27] returns "CLEAR") try_boom_7([7], "BOOM") try_boom_7([], "CLEAR") try_boom_7([7, 14, 21], "BOOM") try_boom_7([0, 10, 100], "BOOM") try_boom_7([49, 100, 63], "BOOM") '''