Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 wordsStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started