Question: Could someone please help me alter my these two codes so they work work? Execution: ldike The following function make_exclamations is supposed to consume a

Could someone please help me alter my these two codes so they work work?

Could someone please help me alter my these two codes so theywork work? Execution: ldike The following function make_exclamations is supposed to consume

Execution: ldike The following function make_exclamations is supposed to consume a list of messages and return a new list of messages with exclamations at the end ("!" ). The function is defined and called twice, but as you can see, it seems to be returning the wrong value on subsequent runs. Diagnose the problem and fix the function's definition so that it returns the correct value each time Printer Feedback Instructor Feedback Your make exclamations function did not return the right value Given arguments: ['A B'] Expected return: ['A!, B!' Actually returned: ['Hi!', "I'm Klaus!" 'Woah!', Count these!', 'A! B!' Incorrect Answer Trace Variables 'Hi!', "I'm Klaus!"] m Klaus!" Woah!' . 'Count thes Run Blocks Split / Text Reset O Upload History I exclamations = [] 2 def make_exclamations (messages): for message in messages: 4 exclamations.append (message + "!") return exclamations 6 print(make_exclamations (["Hi", "I'm Klaus" ])) 7 print(make exclamations(["Woah", "Count these" 1)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To address the issues in the provided code snippets lets go through each problem step by step 1 make... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!