Answer:
The function in Python is as follows:
def search_file(filename,mystring):
my_dict = {}
count = 0
file = open(filename)
lines = file.readlines()
for line in lines:
count+=1
if mystring.lower() in line.lower():
my_dict[count] = line.rstrip('\n')
return my_dict
Explanation:
This defines the function
def search_file(filename,mystring):
This initializes an empty dictionary
my_dict = {}
This initializes the number of lines to 0
count = 0
This opens the file
file = open(filename)
This reads the lines of the file
lines = file.readlines()
This iterates through the lines
for line in lines:
This increments the number line
count+=1
This checks if the string exists in the line
if mystring.lower() in line.lower():
If yes, the line number and the string are added to the dictionary
my_dict[count] = line.rstrip('\n')
This returns the dictionary
return my_dict
Incomplete question. However, I inferred you are referring to the best word that likely completes the blank space.
Answer:
<u>or don't do;</u>
Explanation:
So, this statement could rightly read;
"People are not interested in what you do<u> or don't</u>. I think, more and more, they're not even really interested necessarily in how you look on paper, like a...."
The place value can be used to convert a binary number, such as 11010010, into decimal form: 11010010 = 1 x 27 + 1 x 26 + 0 x 25 +1 x 24.In light of the aforementioned, the base-4 number system has 4 digits: 0, 1, 2, and 3. Any 2-bit number can be represented by a single base-4 integer since a 2-bit number can only represent one of the values 0, 1, 2, or 3.
<h3>What does base 4 mean?</h3>
- Base-4 is a quaternary number system. Any real number is represented by the digits 0, 1, 2, and 3.
- In light of the aforementioned, the base-4 number system has 4 digits: 0, 1, 2, and 3. Any 2-bit number can be represented by a single base-4 integer since a 2-bit number can only represent one of the values 0, 1, 2, or 3.
- The four digits of Quaternary (Base 4) are 0 through 3.
- Binary code 4 is 100. In a binary number system, we only use the digits 0 and 1 to represent a number, as opposed to the decimal number system, which uses the digits 0 to 9. (bits).
To learn more about Quarternary number system refer to:
brainly.com/question/28424526
#SPJ4
Answer:
The answer is below
Explanation:
Suppose end system A wants to send a large file to end system B, the large file is first divided into smaller chunks. Each chunk is then assigned a header forming a packet. Multiple packets are being generated with each of the packet containing a unique destination address in its header.
When a packet arrives at the packet switch, the switch uses the unique destination address that is attached in the header of the packet to determine the link onto which the packet is to be forwarded.
Answer:
In addition to MLA, <u>American psychological association, Associated Press and Chicago manual of style</u> are widely using referencing techniques,
Explanation:
<u>American Psychological Association(APA)</u>
APA is the largest organization of scholars, they have their own referencing style guidelines that is used by these scholars.
<u>Associated Press</u>
It is also an american based agency that have their own referencing style for citation of research work named as Associated press.
<u>Chicago Manual of Style</u>
It is also an american referencing style used for reference.