Answered step by step
Verified Expert Solution
Link Copied!

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 =

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions