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
Setler79 [48]
4 years ago
14

Write a application that can determine if a 5 digit number you input is a palindrome. If the number is a palindrome then print "

The number is a palindrome." If it is not then print "The number is NOT a palindrome"
Computers and Technology
1 answer:
notsponge [240]4 years ago
4 0

Answer:

Written in Python:

num = int(input("Number: "))

strnum = str(num)

if len(strnum) !=5:

    print("Length must be 5")

else:

    if(strnum[::-1] == strnum):

         print("The number is a palindrome.")

    else:

         print("The number is NOT palindrome.")

Explanation:

This prompts user for input

num = int(input("Number: "))

This converts user input to string

strnum = str(num)

This checks the length of the string

if len(strnum) !=5:

    print("Length must be 5") If length is not 5, this prompt is printed

else:If otherwise

    if(strnum[::-1] == strnum): The compares the string reversed with the original

         print("The number is a palindrome.") If both are the same, this line is executed

    else:

         print("The number is NOT palindrome.") If otherwise, this line is executed

You might be interested in
Congress are smart becuase.....
spin [16.1K]

Answer:

If we are talking about government then they are smart bc of there two house policies, both are equal yet super unique. They make sure each state has an equal voice in the senate.

5 0
3 years ago
What is authentication?
Savatey [412]

Answer:

C

Explanation:

I believe that's the answer if it's not sorry

8 0
3 years ago
A student will not be allowed to sit in exam if his/her attendance is less than 75% .
Oxana [17]

Answer:

Sorry, this is too vague to understand as you don’t have any charts, graphs, or anything

Explanation:

6 0
3 years ago
Who knows a website to learn how to code in java?
Murrr4er [49]
Simple...

Although we are not allowed to link in websites..(against guidelines) you can search up codeacademy, this is a place to learn to code.

Thus, your answer.
6 0
3 years ago
What is the recommended solution to configure this automated behavior? UC has a requirement that an opportunity should have a fi
Dmitry_Shevchenko [17]
The answer will need to be workflow.
8 0
4 years ago
Other questions:
  • Algorithm for converting decimal into binary.
    7·1 answer
  • In which of the following locations can you edit all of the Properties of a PowerPoint file?
    11·1 answer
  • Assume that the myname.txt file is currently closed. write the code segment that opens the file without erasing it, write anothe
    13·1 answer
  • What would be the results of the following code? final int SIZE = 25; int[] array1 = new int[SIZE]; … // Code that will put valu
    9·1 answer
  • What sound signal tells another boater that you wish to pass on your starboard (right) side?
    15·1 answer
  • Jason Is Working On A Video Science Project. As He Is Working On It, He Saves The Project.
    5·1 answer
  • What program is best for teaching young people code?
    13·1 answer
  • Consider the following methods.public void modParams(int[] x, int[] y, String[] s){x[1] = 5;y = x;s[1] = new String("five");s =
    6·1 answer
  • How do you change the number of rows and columns displayed for an embedded Excel object on a PowerPoint slide?
    8·1 answer
  • Which option is designed by software engineers?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!