Question: Question 2 Consider the following program: def whatwhat(g): w=[-3:] q return w W q = abcdefg r = whatwhat(q[:41) After you run this program, why

 Question 2 Consider the following program: def whatwhat(g): w=[-3:] q return

Question 2 Consider the following program: def whatwhat(g): w=[-3:] q return w W q = "abcdefg r = whatwhat(q[:41) After you run this program, why is r 'bcd' and not 'efg'? Because we pass 'abcd' to the function "whatwhat" instead of abcdefg| Because we need to write "return q" instead of "return w" Because we assign"W - q[-3.)" instead of "w= a1-4:]" Because we need to write return w[-3.:]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Finance Questions!