Question
Consider the following Python code: text =
"banana" char_to_find = 'a' count = 0 for i in range(len(text)): Â Â if text[i] == char_to_find: Â Â Â Â count += 1 Â Â Â Â if count == 2: Â Â Â Â Â Â print(i) Â Â Â Â Â Â break What will be the output of this code?Solution
Correct Answer: B (b-0, a-1, n-2, a-3, n-4, a-5) - i=0, text='b' - i=1, text='a', count=1 - i=2, text='n' - i=3, text='a', count=2. count == 2 is true. Prints 3. Breaks.
How many 5's are there followed by 3 but not preceded by 7?
7 5 3 1 6 8 5 8 4 3 5 3 7 1 6 1 5 8 6 4 5 3 2 5
...In each of the following questions select the one which is different from the other three responses.
Select the one which is different from the other three responses.
Four of the following five figures are alike in a certain way and thus form a group. Which is the one that does NOT belong to that group?
Â
(A) Calm: Windy
(B) Happy: Sane
(C) Extravagant: Thrifty
(D) Limited: Boundless
In each problem, out of the four figures marked (1) (2) (3) and (4), three are similar in a certain manner. However, one figure is not like the other t...
Choose the figure which is different from the rest.
Choose the figure which is different from the rest.

From among the given alternatives select the one in which the set of numbers is most like the set of numbers given in the question.
(5, 9, 17)