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]
3 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]3 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
Technically
Sedaia [141]

The answer should be True


7 0
3 years ago
Write an interactive Python calculator program. The program should allow the user to type a mathematical expression, and then pr
kozerog [31]

Answer:

please check this images that are below

Explanation:

3 0
3 years ago
Sami needs to decide how the fonts, colors, and images will look on her new web site. Which will help her pian her design?
shtirl [24]
Maybe a sketchbook:))))
6 0
2 years ago
whenever I try to make an account it says it can't sign me up at this time or something- can you help?-
Rus_ich [418]

Answer:

You can try emailing tech support and describing your issue. In order to get the best help as quickly as possible, try providing screenshots of what happens when you sign in or describe everything you see on the screen when the problem occurs, and quote error messages directly when possible.

5 0
3 years ago
How many binary digits does a single hexadecimal digit represent?
Anna35 [415]
Four binary digits.  So letter D.


8 0
3 years ago
Other questions:
  • The cost of large ground based telescopes has remained the same since the 1800's costing the equivalent of about a billion dolla
    9·1 answer
  • An administrator has noticed that GPO containing new update settings has not yet applied to one of the computers on the network.
    5·1 answer
  • ABC software company is to develop software for effective counseling for allotment of engineering seats for students with high s
    13·1 answer
  • How do you double space on microsoft word?
    5·1 answer
  • Which type of virus includes protective code that prevents outside examination of critical elements?
    14·1 answer
  • Write a method body for the static method isDivisibleBy5 shown below. The only NaturalNumber methods you are allowed to use are
    12·1 answer
  • A subroutine may be used to refer to which of the following? Check all that apply.
    15·2 answers
  • Use the drop-down menu to complete the steps for using the Goal Seek feature.
    13·2 answers
  • Working with text in presentation programs is very ____ using text in other applications.
    10·1 answer
  • To optimize the flow of data into and out of the cpu, the modern mcc provides at least _______________ of data every time the cp
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!