Question: I've got code below for this exercise. But it is not working, there might be something missing or it is wrong. #include main(){ word =

I've got code below for this exercise. But it is not working, there might be something missing or it is wrong.
#include
main(){
word = input("Enter a word: ")
if word == word[::-1]:
print("The word is a palindrome.")
else:
print("The word is not a palindrome.")}
Lab 08 - Exercise 2. Write a program that asks the user to input a word. The program should then check whether the user has entered a palindrome () () Palindromes are words or phrases that are spelt the same backwards as they are forward Eg. rotor, radar and level are all palindromic words
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
