1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Alex
3 years ago
12

Special words are those words that start and end with the same letter. [14]

Computers and Technology
1 answer:
wel3 years ago
3 0

Answer:

<em>This program is written in python programming language</em>

<em>The program uses few comments (See Explanation for further explanation of each line)</em>

<em>See attachment for proper format view of the source code</em>

<em>Program starts here</em>

<em></em>

#Prompt user for Input

inpstring = input("Enter a string: ")

#Reverse user input

revstring = inpstring[::-1]

#Calculate length of user input

i = len(inpstring)

if(inpstring.upper() == revstring.upper()):

     print("The input string is Palindrome")

else:

     if(inpstring[0].upper() == inpstring[i-1].upper()):

           print("The input string is a Special Word")

     else:

           print("The input string is neither Palindrome nor Special")

Explanation:

inpstring = input("Enter a string: ")-> This line accepts input from user

revstring = inpstring[::-1]-> This line reverses user input

i = len(inpstring)-> This line calculates the length of user input

The following if statement checks for palindromes; i.e. if input string is equal to reversed string

if(inpstring.upper() == revstring.upper()):

     print("The input string is Palindrome")

If the above is statement is not true, the following is executed (to check for special word)

else:

The following if statement checks if the first letter of the input string is equal to its last letter

     if(inpstring[0].upper() == inpstring[i-1].upper()):

           print("The input string is a Special Word")

If the above statement if not true, then input string is not a special word and it's not palindromic.

Hence, the its accompanying else statement will be executed

     else:

           print("The input string is neither Palindrome nor Special")

You might be interested in
Need answer quick plz.
morpeh [17]

Answer:

SPSS

IS THE ANSWER

IHOPEIT WILL HELP YOU

4 0
3 years ago
The _______ command was developed by nicholas harbour of the defense computer forensics laboratory.
Lena [83]
Hi! The answer is dcfldd
3 0
3 years ago
Paano nakatutulong ang teknolohiyang pangkomunikasyon sa pangangalap ng impormsyon
Makovka662 [10]

Answer:

Yes correct. Absolutely breathtaking. You should create poetry with your writing skills.

6 0
3 years ago
Name an analog quantity other than temperature and sound
liq [111]
I know that this might be wrong but is it light?
6 0
4 years ago
Which of the following is the fastest growing input technique​
Natali [406]
We need more information for this one, please.
8 0
3 years ago
Other questions:
  • You are able to change the formatting of a table after it is inserted into a placeholder. True or false
    9·2 answers
  • Digital manipulation is commonly referred to as _______. Kodaking photo-oping Photoshopping photofixing
    6·2 answers
  • Why are video texts an example of multimedia? A. They use audio and visual elements together. B. They use one type of medium to
    13·2 answers
  • For C programming language, what does it mean when you have an exclamation mark after an equal sign? ie:
    5·1 answer
  • In this chapter, you saw an example of how to write an algorithm that determines whether a number is even or odd. Write a progra
    6·2 answers
  • Your task is to diagnose and correct the problem. In the computer, the top hard drive contains the operating system files. Troub
    14·1 answer
  • How do u mark bralienst
    5·1 answer
  • 1.Discuss the complexities of owning and sharing digital information.
    5·1 answer
  • There are three groups of people, people who like Apples, Bananas, and Cherries. 19 people like Apples. 23 people like Bananas.
    15·1 answer
  • state how to transfee information from website to el processing document in computers and technology.​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!