Answer:
1.word = "George slew the dragon"
startIndex = word.find('dr')
endIndex = startIndex + 4
drWord = word[startIndex:endIndex]
2. sentence = "Broccoli is delicious."
sentence_list = sentence.split(" ")
firstWord = sentence_list[0]
Explanation:
The above snippet is written in Python 3.
1. word is initialized to a sentence.
Then we find the the occurence of 'dr' in the sentence which is assign to startIndex
We then add 4 to the startIndex and assign it to endIndex. 4 is added because we need a length of 4
We then use string slicing method to create a substring from the startIndex to endIndex which is assigned to drWord.
2. A string is assigned to sentence. Then we split the sentence using sentence.split(" "). We split based on the spacing. The inbuilt function of split returns a list. The first element in the list is assigned to firstWord. List uses zero based index counting. So. firstWord = sentence_list[0] is use to get first element.
Butter to Margarine
Cakes baked with butter usually always turns out to be greasy and heavy.
Hope this helps, good luck! (:
An algorithm<span> is a well-defined procedure that allows a </span>computer<span> to solve a problem. Another way to describe an </span>algorithm<span> is a sequence of unambiguous instructions. ... In fact, it is difficult to think of a task performed by your </span>computer<span> that does not use</span>algorithms<span>.</span>
Answer:
False.
Explanation:
Ubuntu which is an linux distribution and it is based on debian. Ubuntu does not come with automatic firewall and we also have to manually enable the firewall after installing it otherwise it will be disabled.
You can control the firewall from a graphical interface.
Hence the answer to this question is False.