Answer:
Light text on a dark background
Explanation:
Microsoft PowerPoint is an application software in which the company ables to introduce themselves by making slides and presented to an audience in an easy and innovative way. In this, we can add pictures, sound, video by adding the different text, colors, backgrounds, etc
For memorable and professional presentations, the light text on a dark background is a best combination as it is easy to read and give the best view of the message you want to convey.
An organization is struggling to differentiate threats from normal traffic and access to systems. A security engineer has been asked to recommend a system that will aggregate data and provide metrics that will assist in identifying malicious actors or other anomalous activity throughout the environment. Which of the following solutions should the engineer recommend?a. Web application firewall b. SIEM c. IPS d. UTM e. File integrity monitor
Answer:
b. SIEM.
Explanation:
In this scenario, an organization is struggling to differentiate threats from normal traffic and access to systems. A security engineer has been asked to recommend a system that will aggregate data and provide metrics that will assist in identifying malicious actors or other anomalous activity throughout the environment. The solution the engineer should recommend is the Security information and event management (SIEM).
Security information and event management is an enterprise software that provides a holistic view and analyzes activity from various resources across an entire information technology (IT) infrastructure.
The SIEM is used to aggregate important data from multiple source such as servers, routers, firewall, switches, domain controllers, antivirus software and analyzes the data to detect any threat, deviation from the norm, as well as investigate in order to take appropriate actions. Some examples of the SIEM system are IBM QRadar, Splunk, LogRhythm etc.
Alcatel-Lucent’s High Leverage Network (HLN) increases bandwidth and network capabilities while reducing the negative impact on the environment. HLN can handle large amounts of traffic more efficiently because __________.
Answer:
The networks are intelligent and send packets at the highest speed and most efficiently.
Explanation:
Alcatel-Lucent was founded in 1919, it was a French global telecommunications equipment manufacturing company with its headquarter in Paris, France. Alcatel-Lucent provide services such as telecommunications and hybrid networking solutions deployed both in the cloud and on properties.
Alcatel-Lucent’s High Leverage Network (HLN) increases bandwidth and network capabilities while reducing the negative impact on the environment. This high leverage network can handle large amounts of traffic more efficiently because the networks are intelligent and send packets at the highest speed and most efficiently. HLN are intelligent such that it delivers increased bandwidth using fewer devices and energy.
Generally, when the High Leverage Network (HLN) is successfully implemented, it helps telecommunications companies to improve their maintenance costs, operational efficiency, enhance network performance and capacity to meet the bandwidth demands of their end users.
A systems analyst attended a week-long workshop on Agile software development. When she returned to her job, she told her boss that agile practices were not worth the time to learn and use on the job. Her view was that it was too academic and idealistic to be useful. Do you agree or disagree?Defend your position.
Answer:
The answer is "disagree"
Explanation:
The system analyst is responsible, who uses research and methods of solving industrial problems with IT. He or she may act as representatives of change that identify, that process improvements needed design systems for such improvements, or inspire us to use systems.
Analysts testing and diagnosing issues in operating systems for QA applications and the programmer analyst design and write custom software, that satisfy the requirements of their employers or customers. For the system analysis, the analyst uses all types of techniques, which may be old's, that's why we disagree with the analyst.Explain why it is not necessary to create an inbound rule on the internal 192.168.12.10 Windows server so that it can receive the response (ICMP echo reply) from the internal 192.168.12.11 Windows server.
Answer:
The file and printer sharing (Echo Request - ICMPv4-In) rule option should be listed for all profile.
Explanation:
The main reason why it is not compulsory or obligatory to design an inbound rule on the internal 192.168.12.10 Windows server in other to be able to accept the response (ICMP echo reply) generated from the internal 192.168.12.11 Windows server is that the file and printer sharing (Echo Request - ICMPv4-In) rule option or alternative needed to be listed for all profile.
Inbound rules filter or sieve traffic advancing from the network to the local computer based on the filtering conditions set out in the rule.
What can you do using the start menu in windows 10
Answer:
The start menu in windows 10 has similarities.
Explanation:The windows 10 is start menu and start screen. Installed windows 10 on a PC, the start button after windows appear start menu.Windows app you can access windows apps right the menu. click the left display all apps installed your personal computer. click right to open a window app NEWS,MAIL, or CALENDAR. POWER button at the bottom of the left side, and display the to shut down and restart.
Right click your account name at the top the menu.You add files explorer to taskbar.Simply click the option you needed
A brand of shame .. from infancy " is a brand on Jocasta
Answer: DIDN'T UNDERSTAND
A Fast Critter moves twice as fast as a regular critter. When asked to move by n steps, it actually moves by 2 * n steps. Implement a Fast Critter subclass of Critter whose move method behaves as described.
Answer and Explanation:
The code:
FastCritter.java
Public class FastCritter
{
public static void main(string[]args)
{
Critter DoubleFast = new FastCritter();
DoubleFast.move(10);
System.out.println(DoubleFast.getHistory());
system.out.println(" the critter object will move to 20]");
}
}
in the above, the critter class is assumed to have been defined and the the object DoubleFast which moves twice the distance of the Critter was achieved by using the move method which was defined in the critter class. The move method takes the position of the Critter and adds the steps given to its parameter to the object's move thus getting twice the distance. The get history is assumed to get the history of positions and moves made by the object in an array as defined in the class
Use ____ references when you want different formulas to refer to the same cell.
Answer:
absolute
Explanation:
Use absolute references when you want different formulas to refer to the same cell.
What are absolute references?When dragging rows and columns to replicate formulas in Microsoft Excel, absolute references are the cell references you wish to maintain constant. For instance, the value in cell J4 is necessary for each and every cell in column K.
The reference would go from J4 to J5, then J6, and so on if you dragged it along column K. References that are absolute don't alter when copied or filled. To maintain the consistency of a row and/or column, utilize an absolute reference.
By including a dollar sign, a formula designates an absolute reference. The column reference, the row reference, or both may come before it.
Therefore, when you want different formulas to refer to the same cell, use absolute references.
To learn more about absolute references, refer to the link:
https://brainly.com/question/23944876
#SPJ6
What will be displayed if code corresponding to the following pseudocode is executed? Set Number = 4 Repeat Write 2 * Number Set Number = Number + 2 Until Number = 8
Answer:
8
12
Explanation:
I made the code a bit easier to understand then worked out how it would go. Here's what I did.
number = 4
repeat until number = 8:
write 2 * number
number = number + 2
Following this itenary, we have, the system first writes "8" as it multipled 4 by 2. Number is now equal to 6.
Next repetition, the system writes "12" as it multipled 6 by 2. Now, number = 8. The proccess now stops as number is now equal to 8.
A developer writes a SOQL query to find child records for a specific parent. How many levels can be returned in a single query?
Answer:
One.
Explanation:
In this case, when a developer writes a SOQL query in order to find to find child records for a specific parent, one search will return only one child. One level down i.e., from parent to child, or five levels up i.e., from child to parent. Note that SOQL statements will not return relationships that are greater than one level apart from the root entity object.
What is the value of the variable named myNum after the statements that follow are executed? var myNum = 14; var yourNum = 4; myNum++; yourNum-- myNum = myNum * yourNum;
Answer:
45
Explanation:
Initially, myNum is equal to 14 and yourNum is equal to 4
Then, myNum is incremented by 1 and becomes 15
Also, yourNum is decremented by 1 and becomes 3
Finally, myNum is set to myNum x yourNum, 15 x 3 = 45
Lily is in her first year of undergraduate coursework and has not yet declared a major. She has attended a lot of career fairs and undergraduate major "open house" events to investigate her options. Marcia's theory of identity status suggests that the dimension Lily is most concerned with is the_____of 1 dimension.
Answer:
exploration
Explanation:
According to Marcia's theory of identity, the status suggests that the dimension Lily is most concerned with is the exploration dimension.
James E. Marcia who came up with the Marcia's theory of identity is a clinical and developmental psychologist. He also once taught at Simon Fraser University which is located in British Columbia, Canada and also in the State University of New York at Buffalo in Upstate, New York City.
James E. Marcia is also very much involved in clinical private practice, community consultation, clinical psychology supervision, and also in international clinical-developmental research and teaching.
How many times does the following loop execute? double d; Random generator = new Random(); double x = generator.nextDouble() * 100; do { d = Math.sqrt(x) * Math.sqrt(x) - x; System.out.println(d); x = generator.nextDouble() * 10001; } while (d != 0); exactly once exactly twice can't be determined always infinite loop
Answer:
The number of execution can't always be determines
Explanation:
The following points should be noted
Variable d relies on variable x (both of double data type) for its value
d is calculated as
[tex]d = \sqrt{x}^2 - x[/tex]
Mere looking at the above expression, the value of d should be 0;
However, it doesn't work that way.
The variable x can assume two categories of values
Small Floating Point ValuesLarge Floating Point ValuesThe range of the above values depend on the system running the application;
When variable x assumes a small value,
[tex]d = \sqrt{x}^2 - x[/tex] will definitely result in 0 and the loop will terminate immediately because [tex]\sqrt{x}^2 = x[/tex]
When variable x assumes a large value,
[tex]d = \sqrt{x}^2 - x[/tex] will not result in 0 because their will be [tex]\sqrt{x}^2 \neq x[/tex]
The reason for this that, the compiler will approximate the value of [tex]\sqrt{x}^2[/tex] and this approximation will not be equal to [tex]x[/tex]
Hence, the loop will be executed again.
Since, the range of values variable x can assume can not be predetermined, then we can conclude that the number of times the loop will be executed can't be determined.
1. Railroad tracks present no problems for a motorcyclist.
A. O TRUE
B. O FALSE
2. Which of the following is considered to be a vulnerable road user?
A. Bicyclists
B. Motorcyclists
C. Pedestrians
D. all of the above
Answer: 1 is A
2 is D
Explanation:
Availability is an essential part of ________ security, and user behavior analysis and application analysis provide the data needed to ensure that systems are available. baseline infrastructure applications network
Answer:
Network.
Explanation:
Availability is an essential part of network security, and user behavior analysis and application analysis provide the data needed to ensure that systems are available.
Availability in computer technology ensures that systems, applications, network connectivity and data are freely available to all authorized users when they need them to perform their daily routines or tasks. In order to make network systems available regularly, it is very essential and important to ensure that all software and hardware technical conflicts are always resolved as well as regular maintenance of the systems.
A network administrator can monitor the network traffics and unusual or unknown activities on the network through the user behavior analysis and data gathered from the application analysis to ensure the effective and efficient availability of systems.
Oops, we made a mistake: we created a key "short" and gave it the value "tall", but we wanted to give it the value "long" instead. Write the line of code that will change the value associated with the key "short" to "long". Be consistent in whether you use single or double quotes to declare your strings: our autograder assumes you'll be consistent.
Answer:
Using java
//assuming that hashmap object name is ChangeMap
ChangeMap. replace("short", "long");
System.out.println("New HashMap: "
+ ChangeMap.toString());
Explanation:
From the above we have used the replace method to replace the value of the "short" key in the hashtable with "long" instead of the previous value "tall". We have used the printed the hashtable to the console using println and the ".toString()" method that we added to the function's parameter.
Write a method named removeDuplicates that accepts a string parameter and returns a new string with all consecutive occurrences of the same character in the string replaced by a single occurrence of that character. For example, the call of removeDuplicates("bookkeeeeeper") should return "bokeper" .
Answer:
//Method definition
//Method receives a String argument and returns a String value
public static String removeDuplicates(String str){
//Create a new string to hold the unique characters
String newString = "";
//Create a loop to cycle through each of the characters in the
//original string.
for(int i=0; i<str.length(); i++){
// For each of the cycles, using the indexOf() method,
// check if the character at that position
// already exists in the new string.
if(newString.indexOf(str.charAt(i)) == -1){
//if it does not exist, add it to the new string
newString += str.charAt(i);
} //End of if statement
} //End of for statement
return newString; // return the new string
} //End of method definition
Sample Output:
removeDuplicates("bookkeeeeeper") => "bokeper"
Explanation:
The above code has been written in Java. It contains comments explaining every line of the code. Please go through the comments.
The actual lines of codes are written in bold-face to distinguish them from comments. The program has been re-written without comments as follows:
public static String removeDuplicates(String str){
String newString = "";
for(int i=0; i<str.length(); i++){
if(newString.indexOf(str.charAt(i)) == -1){
newString += str.charAt(i);
}
}
return newString;
}
From the sample output, when tested in a main application, a call to removeDuplicates("bookkeeeeeper") would return "bokeper"
A large population of ALOHA users manages to generate 50 requests/sec, including both originals and retransmissions. Time is slotted in units of 40 msec.
Required:
a. What is the chance of success on the first attempt?
b. What is the probability of exactly k collisions and then a success?
c. What is the expected number of transmission attempts needed?
Answer:
The answer is below
Explanation:
Given that:
Frame transmission time (X) = 40 ms
Requests = 50 requests/sec, Therefore the arrival rate for frame (G) = 50 request * 40 ms = 2 request
a) Probability that there is success on the first attempt = [tex]e^{-G}G^k[/tex] but k = 0, therefore Probability that there is success on the first attempt = [tex]e^{-G}=e^{-2}=0.135[/tex]
b) probability of exactly k collisions and then a success = P(collisions in k attempts) × P(success in k+1 attempt)
P(collisions in k attempts) = [1-Probability that there is success on the first attempt]^k = [tex][1-e^{-G}]^k=[1-0.135]^k=0.865^k[/tex]
P(success in k+1 attempt) = [tex]e^{-G}=e^{-2}=0.135[/tex]
Probability of exactly k collisions and then a success = [tex]0.865^k0.135[/tex]
c) Expected number of transmission attempts needed = probability of success in k transmission = [tex]e^{G}=e^{2}=7.389[/tex]
Explain ways that computer-related errors are associated with the people using those computers. Contrast that with errors made by the computer systems directly.
Answer and Explanation:
Computer related errors associated with people that use these computers are errors that are made by human beings in instructing(or programming) the computer to do or complete a certain task. This could involve such things as moving paper based data to the computer(electronic data) where the human could enter incorrect data or inconsistent programs or code.
Computer related errors which directly have to do with the computer consist of error thrown by the system as a result of ineffective code or software related issues or faulty hardware. In either case all computer related errors are inherently caused by humans since a computer would only take instruction given to it.
What is industry 4.0 -automation revolution-, what is your opinion about the direction this revolution is taking the industry in, and discuss the fate of unskilled and semi-skilled workers affected by industry 4.0.
Answer:
Find the explanation below.
Explanation:
1. Industry 4.0 -automation revolution is a term first used in Germany in 2011 to describe the fourth generation of the industrial revolution. It is the incorporation of digitalized procedures that use smart technology that can work in real-time to industrial production. This means that the machines used in production can independently interact between themselves to accomplish tasks that would otherwise have needed human involvement.
2. My opinion regarding this industrial revolution is that it is a welcome development for businesses because it will help them execute projects at faster rates and limit some working expenses.
3. Unskilled and Semi-skilled workers will be badly affected by this revolution because tasks ordinarily performed by them would be mostly taken over by these machines. This means that companies would most likely lay off these workers whose jobs would now be performed by machines. Job regulation agencies would do well to seek ways to intervene for this group of workers. They may also have to improve their skills if they want to remain relevant to their jobs.
The revolution, however, would be favorable for high-skilled workers because they would be needed to perform jobs such as the maintenance and programming of these machines.
Teachers in most school districts are paid on a schedule that provides a salary based on their number of years of teaching experience. For example, a beginning teacher in the Lexington School District might be paid $30,000 the first year. For each year of experience after this first year, up to 10 years, the teacher receives a 2% increase over the preceding value. Write a program that displays a salary schedule, in tabular format, for teachers in a school district. The inputs are:
Answer:
Here is the python code:
StartingSal = int(input("Enter the starting salary: "))
AnnualIncrease = (int(input("Enter the annual % increase: ")) / 100)
Years = int(input("Enter the number of years: "))
for count in range(1,Years+1):
print("Year ", count, " Salary: ", StartingSal*((1+AnnualIncrease)**(count-1)))
Explanation:
This program prompts the user to enter starting salary, percentage increase in salary per year and number of years.
The for loop has range function which is used to specify how many times the salaries are going to be calculated for the number of years entered. It starts from 1 and ends after Years+1 means one value more than the year to display 10 too when user inputs 10 days.
The year and corresponding salary is displayed in output. At every iteration the starting salary is multiplied by annual percentage increase input by user. Here count is used to count the number of salaries per year, count-1 means it will start from 30000.
Use the loop invariant (I) to show that the code below correctly computes the product of all elements in an array A of n integers for any n ≥ 1. First use induction to show that (I) is indeed a loop invariant, and then draw conclusions for the termination of the while loop.
Algorithm 1 computeProduct(int[ ] A, int n)
p = a[0]
i = 0
while i < n − 1 do
//(I) p = a[0] · a[1] · · · a[i] (Loop Invariant)
i + +
p = p · a[i]
end while
return p
Answer:
Given Loop Variant P = a[0], a[1] ... a[i]
It is product of n terms in array
Explanation:
The Basic Step: i = 0, loop invariant p=a[0], it is true because of 'p' initialized as a[0].
Induction Step: Assume that for i = n - 3, loop invariant p is product of a[0], a[1], a[2] .... a[n - 3].
So, after that multiply a[n - 2] with p, i.e P = a[0], a[1], a[2] .... a[n - 3].a[n - 2].
After execution of while loop, loop variant p becomes: P = a[0], a[1], a[2] .... a[n -3].a[n -2].
for the case i = n-2, invariant p is product of a[0], a[1], a[2] .... a[n-3].a[n-2]. It is the product of (n-1) terms. In while loop, incrementing the value of i, so i=n-1
And multiply a[n-1] with p, i.e P = a[0].a[1].a[2].... a[n-2].
a[n-1]. i.e. P=P.a[n-1]
By the assumption for i=n-3 loop invariant is true, therefore for i=n-2 also it is true.
By induction method proved that for all n > = 1 Code will return product of n array elements.
While loop check the condition i < n - 1. therefore the conditional statement is n - i > 1
If i = n , n - i = 0 , it will violate condition of while loop, so, the while loop will terminate at i = n at this time loop invariant P = a[0].a[1].a[2]....a[n-2].a[n-1]
You are a project manager for Laredo Pioneer's Traveling Rodeo Show. You're heading up a project to promote a new line of souvenirs to be sold at the shows. You are getting ready to write the project management plan and know you need to consider elements such as policies, rules, systems, relationships, and norms in the organization. Which of the following is not true? A These describe the authority level of workers, fair payment practices, communication channels, and the like. B This describes organizational governance framework. C This describes management elements. D This is part of the EEF input to this process.
Answer:
A. These describe the authority level of workers, fair payment practices, communication channels, and the like.
Explanation:
As seen in the question above, you have been asked to write the project management plan and know that you need to consider elements such as policies, rules, systems, relationships and standards in the organization. These elements are part of EEF's entry into this process, in addition they are fundamental and indispensable for the description not only of the organizational governance structure, but also describe the management elements that will be adopted and used.
However, there is no way to use them to describe the level of authority of workers, fair payment practices, communication channels and the like, as this is not the function of this.
You turn on your Windows computer and see the system display POST messages. Then the screen goes blank with no text. Which of the following items could be the source of the problem?
1. The video card
2. The monitor
3. Windows
4. Microsoft word software installed on the system.
Similar to Wi-Fi, ____ is designed to provide internet access to fixed locations (sometimes called hot zones), but the coverage is significantly larger
Answer:
WiMAX.
Explanation:
WiMAX is an acronym for Worldwide Interoperability for Microwave Access, it is a wireless communications which is primarily based on the IEEE 802.16 standards for creating Metropolitan Area Network (MAN) for the internet users.
Similar to Wi-Fi, WiMAX is designed to provide internet access to fixed locations (sometimes called hot zones), but the coverage is significantly larger.
WiMAX is capable of covering large metropolitan distance of several kilometers while Wi-Fi covers just a local (short) area measured in meters.
Generally, WiMAX was invented by the WiMAX forum and is a telecommunications standard protocol that provides fixed and fully mobile internet access services over a wide range.
in terms of computer what does mie mean
Answer:
Microsoft Internet explorer
A byte addressable direct-mapped cache has 1024 blocks/lines, with each block having eight 32-bit words. How many bits are required for block offset, assuming a 32-bit address
Answer and Explanation:
"The inquiry as presented is not necessarily responsible. A word has been states as 32-bit. We need to ask if the frame is "byte-addressable" (From this we can access to get an 8-bit piece of information) or "text-addressable" (the smallest open lump is 32-bit) or maybe "half-word-addressable" (the tiny bundle of information it could reach to 16-bit).
To understand what the smallest request bit of a position is to let anyone know, you have to remember this.
You operate from base up at that stage. We will agree with the byte-addressable structure. Every reserved square at a certain point contains 8 words * (4 bytes/word) = 32 = 25 bytes, so the counterbalance seems to be 5 bits.
The history in a direct-mapped stored is the squares in reserves (12 bits for this position due to 212 = 4096). at a certain point, as you have seen, the tag is also one of the bits left behind.
As the reserve becomes increasingly cooperative. And a similar size remains. These are lesser bits on the list and more bits on the mark.'
How many times will the while loop that follows be executed? var months = 5; var i = 1; while (i < months) { futureValue = futureValue * (1 + monthlyInterestRate); i = i+1; }
Answer:
4 times
Explanation:
It will be executed for values 1,2,3 and 4 for i.
Assume userName equals "Tom" and userAge equals 22. What is displayed in a dialog box when the following statement is executed? alert(userAge + " \nis " + userName + "'s age.");
Answer:
22
is Tom's age.
Explanation:
Since userAge is initialized as 22, 22 will be displayed in a line. Then, since there is a "\n" which means go the new line, the program will display in the new line. is will be displayed. Since userName is initialized as Tom, Tom will be displayed. Then 's age. will be displayed in the same line.
The compare_strings function is supposed to compare just the alphanumeric content of two strings, ignoring upper vs lower case and punctuation. But something is not working. Fill in the code to try to find the problems, then fix the problems.
import re
def compare_strings(string1, string2):
#Convert both strings to lowercase
#and remove leading and trailing blanks
string1 = string1.lower().strip()
string2 = string2.lower().strip()
#Ignore punctuation
punctuation = r"[.?!,;:-']"
string1 = re.sub(punctuation, r"", string1)
string2 = re.sub(punctuation, r"", string2)
#DEBUG CODE GOES HERE
print(___)
return string1 == string2
print(compare_strings("Have a Great Day!", "Have a great day?")) # True
print(compare_strings("It's raining again.", "its raining, again")) # True
print(compare_strings("Learn to count: 1, 2, 3.", "Learn to count: one, two, three.")) # False
print(compare_strings("They found some body.", "They found somebody.")) # False
Answer:
There is a problem in the given code in the following statement:
Problem:
punctuation = r"[.?!,;:-']"
This produces the following error:
Error:
bad character range
Fix:
The hyphen - should be placed at the start or end of punctuation characters. Here the role of hyphen is to determine the range of characters. Another way is to escape the hyphen - using using backslash \ symbol.
So the above statement becomes:
punctuation = r"[-.?!,;:']"
You can also do this:
punctuation = r"[.?!,;:'-]"
You can also change this statement as:
punctuation = r"[.?!,;:\-']"
Explanation:
The complete program is as follows. I have added a print statement print('string1:',string1,'\nstring2:',string2) that prints the string1 and string2 followed by return string1 == string2 which either returns true or false. However you can omit this print('string1:',string1,'\nstring2:',string2) statement and the output will just display either true or false
import re #to use regular expressions
def compare_strings(string1, string2): #function compare_strings that takes two strings as argument and compares them
string1 = string1.lower().strip() # converts the string1 characters to lowercase using lower() method and removes trailing blanks
string2 = string2.lower().strip() # converts the string1 characters to lowercase using lower() method and removes trailing blanks
punctuation = r"[-.?!,;:']" #regular expression for punctuation characters
string1 = re.sub(punctuation, r"", string1) # specifies RE pattern i.e. punctuation in the 1st argument, new string r in 2nd argument, and a string to be handle i.e. string1 in the 3rd argument
string2 = re.sub(punctuation, r"", string2) # same as above statement but works on string2 as 3rd argument
print('string1:',string1,'\nstring2:',string2) #prints both the strings separated with a new line
return string1 == string2 # compares strings and returns true if they matched else false
#function calls to test the working of the above function compare_strings
print(compare_strings("Have a Great Day!","Have a great day?")) # True
print(compare_strings("It's raining again.","its raining, again")) # True
print(compare_strings("Learn to count: 1, 2, 3.","Learn to count: one, two, three.")) # False
print(compare_strings("They found some body.","They found somebody.")) # False
The screenshot of the program along with its output is attached.
Following are the modified program to the given question:
Program Explanation:
Import package.Defining a method "compare_strings" that takes two parameters "string1, string2".Inside the method, parameter variables have been used that convert and hold string values into lower case.In the next step, a variable "punctuation" is defined that holds value.After this, a parameter variable is used that calls the sub-method that checks parameter value with punctuation variable value, and at the return keyword is used that check string1 value equal to string2.Outside the method, multiple print method is used calls the method, and prints its value.Program:
import re #import package
def compare_strings(string1, string2):#defining a method compare_strings that takes two parameters
string1 = string1.lower().strip()#defining a variable string1 that converts and holds string value into lower case
string2 = string2.lower().strip()#defining a variable string1 that converts and holds string value into lower case
punctuation = r'[^\w\s]'#defining a variable that holds value
string1 = re.sub(punctuation, '', string1)#using the variable that calls the sub method that checks parameter value with punctuation variable value
string2 = re.sub(punctuation, '', string2)#using the variable that calls the sub method that checks parameter value with punctuation variable value
return string1 == string2#using return keyword that check string1 value equal to string2
print(compare_strings("Have a Great Day!", "Have a great day?")) # calling method that prints the return value
print(compare_strings("It's raining again.", "its raining, again")) # calling method that prints the return value
print(compare_strings("Learn to count: 1, 2, 3.", "Learn to count: one, two, three.")) # calling method that prints the return value
print(compare_strings("They found some body.", "They found somebody.")) # calling method that prints the return value
Output:
Please find the attached file.
Learn more:
brainly.com/question/21579839