Answer:
The program in Python is as follows:
s = input("Three letter string: ")
if(len(s)==3):
print(s[::-1])
else:
print("Invalid length")
Step-by-step explanation:
This prompts the user for a three-letter string
s = input("Three letter string: ")
The following if condition checks if the length of the string is 3. If yes, it reverses and print the reversed string
if(len(s)==3):
print(s[::-1])
If otherwise, it prints "Invalid length"
else:
print("Invalid length")