Answer:
phrase[2:5]
Step-by-step explanation:
Given:
The above code segment
Required
Which instruction returns 'u a'
First, we need to get the index of u in the phrase:
u is at the third position but in programming, index starts at 0.
So, u is at index 2
Next, we need to get the index of a in the phrase:
a is at index 4
One of the ways to return a sub string from a string in python is
![string[start:stop+1]](https://img.qammunity.org/2021/formulas/computers-and-technology/college/c3rn9rmr4ocdl0q7njsdn10dgl4199cazt.png)
Where:
----- index of u
----- index of a
phrase ---- The string variable
So, the instruction that returns 'u a' is:
![phrase[2:5]](https://img.qammunity.org/2021/formulas/computers-and-technology/college/lo2vu6sy5bh5pfz1w7fp7u94a2aqgnmzp7.png)
Where 5 = 4 + 1