The message was a bible quote "what hath god wrought?"
Answer:
B: blank = blanks[:n] + letter + blanks[n+1:]
Explanation:
While I don't know what the different sections of this line of code does, I was able to find my answer by looking through the section of code below the videos and found this identical line. This is sometimes the best technique for finding answers to questions like this because it was rather hard to find otherwise. Hope this helps :)
C because you already have you sheet prepared
Answer:
phrase[2:5]
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://tex.z-dn.net/?f=string%5Bstart%3Astop%2B1%5D)
Where:
----- index of u
----- index of a
phrase ---- The string variable
So, the instruction that returns 'u a' is: ![phrase[2:5]](https://tex.z-dn.net/?f=phrase%5B2%3A5%5D)
<em>Where 5 = 4 + 1</em>