Answer:
True
Explanation:
The while loop is going to be executed until the condition is false.
Since <em>k</em> is initially equal to 1, the loop will execute 88 times. One asterisk will be printed and <em>k</em> will be incremented by one during each iteration.
When <em>k</em> becomes 89, the condition will be false (89 is not smaller or equal to 88) and the loop will stop.
Answer:Amino Acid
Explanation:
All proteins have amino acids
Answer:
Explanation:
The following Python program uses a combination of dictionary, list, regex, and loops to accomplish what was requested. The function takes a file name as input, reads the file, and saves the individual words in a list. Then it loops through the list, adding each word into a dictionary with the number of times it appears. If the word is already in the dictionary it adds 1 to its count value. The program was tested with a file named great_expectations.txt and the output can be seen below.
import re
def wordCount(fileName):
file = open(fileName, 'r')
wordList = file.read().lower()
wordList = re.split('\s', wordList)
wordDict = {}
for word in wordList:
if word in wordDict:
wordDict[word] = wordDict.get(word) + 1
else:
wordDict[word] = 1
print(wordDict)
wordCount('great_expectations.txt')
Answer:
For question one, the first line It is Iteration, The second line is Comparator, the third line is none of these is correct.
Question two, the index based method for (a) is O(1) (b) O(1) (c) O(N) (d) O(N)
Explanation:
<em>Solution to the question</em>
Question 1:
The Iteration operation is required by the Iterable interface.
n application can indicate a specific way to order the elements of a SortedABList list by passing a(n) Comparator so that we can customize the sorting object to a constructor of the list class.
Suppose a list names contains 8 elements. A call to names.add(0, "Albert") results in: (e) None of these is correct
Question 2:
let us assume that the LBList is built on top of a Linked List and the ABList is built on top of an array:
(a) the add method index based is O(1) in the average case and the O(N) in the worst case
(b) The Index based set operation is O(1) since we can simply move to any index of an array of time constant.
(c) It is O(N) since index Of method needs to look for the whole array (based on worst case or average) to get the index
(d) It is O(N) since index Of method needs to find the whole linked list (on worst case or average ) to search the index.
Answer:
Port Number
Explanation:
In the transport Layer of the OSI Model the port number is used to identify the receiving application. Temporary communication sessions are set up that enable data exchange, the two protocols used are Transmission Control Protocol(TCP) and the User Datagram Protocol(UDP) . Each port is assigned a number that identifies it according to its function. The range for some well-known ports is 0-1023.