Robotics & Artificial Intelligence
Write a Python program to accept a string and check if the given string is a palindrome.
Python String Manipulation
3 Likes
Answer
st = input("Enter a string: ")
if st == st[::-1]:
print("The given string is a palindrome")
else:
print("The given string is not a palindrome")Output
Enter a string: madam
The given string is a palindrome
Enter a string: hello
The given string is not a palindrome
Answered By
2 Likes
Related Questions
Describe the role of sensors in robotics. Give any two examples of different types of sensors.
Explain how gears are used in robotics. Describe any two types of gears.
(a) State the type of sensor which is used for each of the following purposes.
- Proximity detection
- Vision sensing
(b) Name a type of sensor used in air conditioners.
Give any two differences between linear and rotary actuators. Give examples of their use in robotics.