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
Whenever I ask a question I loose points I just asked a question before and I had 56 points now I have 12 now I'll probably have
lilavasa [31]
Just try to answer some questions as well, then you can keep a nice balance.
ps. Only answer the questions you know. 
5 0
3 years ago
Which of the following IS true about usnig the Hatch command ?
xeze [42]

Answer:

What is the following?

Explanation:

There is no following listed, so I can't help you.

6 0
3 years ago
The use of technological advances in agriculture to increase harvests
BigorU [14]
Tractors,water works, plows, water in general
3 0
3 years ago
The =COUNT function calculates what value?
Natalka [10]

c is the anwer of question

4 0
3 years ago
Read 2 more answers
What are the characteristics of the Outlook Rules Wizard? Check all that apply.
Marina CMI [18]

Answer:It is useful for staying organized.

Users can edit the rule description.

Users can move messages to folders.

It is divided into three template choices.

Explanation:

7 0
2 years ago
Other questions:
  • In addition to the ping command, what other command is useful in displaying network delay and breaks in the path to the destinat
    5·2 answers
  • Fundamental types of data, such as strings, integers, and real numbers, are known as
    5·1 answer
  • Read the PIC Data sheet Chapter 2.0 and 3.0 2. List at least 3 big differences between the Flash and RAM 3. How many RAM locatio
    5·1 answer
  • Choose all the items that represent potential ways to find a job opening.
    14·1 answer
  • Write two cin statements to get input values into birthMonth and birthYear. Then write a statement to output the month, a dash,
    7·1 answer
  • It is used to select specific menu options, drag and drop options and to draw something on screen.
    6·1 answer
  • What is pseudo code?
    11·2 answers
  • What are some catchy names for computer basics that you would put on a childrens poster?
    9·1 answer
  • What is the main circuit board inside the computer called?CD-ROMY
    12·1 answer
  • I ate five M&amp;Ms: red, green, green, red and yellow. Only these three colors are possible. I assume that p(yellow)=3p(green)
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!