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 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
Get step-by-step solutions from verified subject matter experts
