Answer: (66.7_1.8)Ω
Explanation: Hope it's helpful
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
Answer:
A device that allows multiple computers to communicate with each other is
Network Hub.
Hope this helps!
:)
Answer:
The central processing unit is the brain of the computer. it is the part of the computer which performs manipulations. it is also called the microprocessor.
components of the CPU: The control unit, the arithmetic and logic unit, the register and the memory unit.
I hope you understand:-):-)