Answer:
Explanation:
The following code is written in Python. It is a recursive function that tests the first and last character of the word and keeps checking to see if each change would create the palindrome. Finally, printing out the minimum number needed to create the palindrome.
import sys
def numOfSwitches(word, start, end):
if (start > end):
return sys.maxsize
if (start == end):
return 0
if (start == end - 1):
if (word[start] == word[end]):
return 0
else:
return 1
if (word[start] == word[end]):
return numOfSwitches(word, start + 1, end - 1)
else:
return (min(numOfSwitches(word, start, end - 1),
numOfSwitches(word, start + 1, end)) + 1)
word = input("Enter a Word: ")
start = 0
end = len(word)-1
print("Number of switches required for palindrome: " + str(numOfSwitches(word, start, end)))
Answer:
The answer is C. Media are connected to networks that make information easier to access and pass on.
Explanation:
Hope this helps you out! Please mark brainliest if it does! :D
Answer:
The correct answer for the following question will be Digital certificate.
Explanation:
An electronic "password" that allows an organization or person to exchange information (data) with security using the public key infrastructure (PKI) over the internet called as Digital certificate. And is also known as Public key certificate and identity certificate.
Digital certificate contains the following things :
- Copy of certificate holder public key.
- Name of certificate holder.
- Serial number which is used to uniquely identify a certificate.
- Expiration dates.
- Digital signature of certificates.
What security provided :
- Identification/Authentication.
- Access Control.
- Non-Repudiation.
- Integrity.
Answer:
The following Window class are given below:
class Window // define a class Window
{
private: //access modifier
int width, height; // integer type variable which is width and height
public: //access modifier
Window(int w,int h) //constructor that accepts two integer parameters
{
width = w;
height = h;
}
friend bool areSameSize(Window a, Window b)
{
if ((a.height == b.height) && (a.width == b.width))
return true;
else return false;
}
};
Explanation:
According to the question: Firstly we have define a class which name is 'Window' and then we take two integer type data member and after that we have constructor that takes two integer type parameters and after all we have a areSameSize, friend function, which can take two objects and then it give output in the form of true or false, if they are the equal size and finally we check that if the width and the height match then it returns the true and else it returns the false