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:
Credit cards.
Explanation:
When booking a reservation, the most popular type or method of making sure the reservation is guaranteed where booking transactions are charged automatics is the use of credit cards.
Why this is popular is because, the hotel, reserve or suite that is about to be booked will still receive their money even if the person that booked didn't show up.
Answer:
Inadequate analysis of system and the design
Explanation:
Some of the causes of failed project in project management are as follows:
- Deficient hazard the executives.
-
Inadequately characterized task scope.
- Inability to recognize key presumptions.
- Undertaking administrators who need involvement and preparing.
- Absence of powerful correspondence at all levels.
- No utilization of formal techniques and procedures.
- Overrun of the budget
The PHP code is given below:
<h3>PHP code</h3>
if(isset($_REQUEST['login_btn'])){
$email = filter_var(strtolower($_REQUEST['email']),FILTER_SANITIZE_EMAIL); //strtolower changes email to all lower case
$password = strip_tags($_REQUEST['password']);
The remaining code is in the file attached.
Read more about PHP here:
brainly.com/question/27750672
#SPJ1