Answer:
Here the code is given as follows,
Explanation:
def isPalindrome(x):
stack = []
#for strings with even length
if len(x)%2==0:
for i in range(0,len(x)):
if i<int(len(x)/2):
stack.append(x[i])
elif stack.pop()!=x[i]:
return False
if len(stack)>0:
return false
return True
#for strings with odd length
else:
for i in range(0,len(x)):
if i==int(len(x)/2):
continue
elif i<int(len(x)/2):
stack.append(x[i])
elif stack.pop()!=x[i]:
return False
if len(stack)>0:
return false
return True
def main():
while True:
string = input("Enter a string or Return to quit: ")
if string == "":
break
elif isPalindrome(string):
print("It's a palindrome")
else:
print("It's not a palindrome")
if __name__ == '__main__':
main()
Answer : Encoding
Explanation : Encoding refers to correctly coding the message so that the receiver gets the clear message without feating any misunderstanding.
Answer:
yes nitro hack is where they time your hacking skills
int counter = 0;
int num = 0;
string output = "";
while (counter < 3) {
num = num * 1;
counter = counter + 1; }
output = Convert.ToString(num);
Output:
Counter = 0
num = 0 * 1 - - > num = 0
Counter = 1
num = 0 * 1 - - > num = 0
Counter = 2
num = 0 * 1 - - > num = 0
Counter = 3 (break)
num = 0
output = "0"