Explanation: torsearch.org is a safe search engine mainly used for dark wed purposes. It does not track your location nor give any personal information.
Answer:
Explanation:
The following code is written in Python. It asks the user for an input. Then cleans the input using regex to remove all commas, whitespace, and apostrophes as well as making it all lowercase. Then it reverses the phrase and saves it to a variable called reverse. Finally, it compares the two versions of the phrase, if they are equal it prints out that it is a palindrome, otherwise it prints that it is not a palindrome. The test case output can be seen in the attached picture below.
import re
phrase = input("Enter word or phrase: ")
phrase = re.sub("[,'\s]", '', phrase).lower()
reverse = phrase[::-1]
if phrase == reverse:
print("This word/phrase is a palindrome")
else:
print("This word/phrase is NOT a palindrome")
Answer:
See Explaination
Explanation:
class MagicSquare():
def __init__(self,side):
self.side=side
self.two_dimension=[]
for row in range(1,side+1):
row_line=[]
for col in range(1,side+1):
row_line.append(0)
self.two_dimension.append(row_line)
def display(self):
row=0
col=int((self.side-1)/2)
for i in range(1,self.side**2+1):
self.two_dimension[row][col]=i
row-=1
col+=1
if row==-1:
row=self.side-1
if col==self.side:
col=0
if self.two_dimension[row][col]==0:
continue
else:
row+=1
if row==self.side:
row==0
for line in self.two_dimension:
for num in line:
print("{0:>3}".format(num),end=" ")
print()
def main():
for i in range(1,14,2):
square=MagicSquare(i)
square.display()
print("----------------------------------------------------")
if __name__ == '__main__':
main()
Answer:
Growth Strategy
Explanation:
A growth strategy is a plan of action that allows you to achieve a higher level of market share than you currently have. Such as the case in the question, PC's shifted so sales and service of Laptops and PCs because there is a greater market share for them there than where they currently operate from.
Answer:
Visual basic
Explanation:
Implicit and Explicit Conversion