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
A software package developed to handle information requirements for a specific type of business is called a(n) ____. A. outsourc
kotykmax [81]

Answer:

Option D i.e., ​vertical application.

Explanation:

A vertical application is called a software package formed to manage the data necessary for a particular form of corporation.

A vertical application is an application that assists a particular firm's method as well as aimed a lower amount of persons within a corporation who have particular skill pairs and work duties.

  • Option A is incorrect about the following scenario because It's the method of recruiting the network operator to establish or improve the section of commercial-use apps.
  • Option B is incorrect about the following scenario because It is an application that an entity has built for its inner usage, which is being further popular.
  • Option B is incorrect about the following scenario because it is the opposite of the vertical application.
6 0
3 years ago
palindrome is a string that reads the same forwards as backwards. Using only a xed number of stacks, and a xed number of int and
bixtya [17]

Solution :

check_palindrome$(string)$

   lower_$case$_string$=$ string$. to$_lower()

   Let stack = new Stack()

   Let queue = new Queue();

   for each character c in lower_case_string:

       stack.push(c);

       queue.enqueue(c);

   let isPalindrome = true;

   while queue is not empty {

       if (queue.remove().equals(stack.pop())) {

           continue;

       } else {

           isPalindrome=false;

           break while loop;

       }

   }

   return isPalindrome

Input = aabb

output = true

input =abcd

output = false

6 0
3 years ago
Which of the following is not an operating system a) boss b) window xp c) linux d) bindux​
zmey [24]

Answer:

boss is not an os

Explanation:

boss is a former of Linux hope this helped

5 0
3 years ago
If you have 60fps on your laptop tell me one way you can go to 240fps
choli [55]

Answer: NO

Explanation:

A 60hz monitor refreshes the screen 60 times per second. Therefore, a 60hz monitor is only capable of outputting 60fps

4 0
3 years ago
Read 2 more answers
What is the amount of a good or service that business have available to sell?
REY [17]
The answer is supply
3 0
3 years ago
Other questions:
  • What is an advantage of sharing documents in PDF format instead of Word format?
    6·2 answers
  • Describe mobile computing
    7·1 answer
  • Which of the following about if statement is true? A. The condition is a Boolean expression B. A Boolean expression is something
    15·1 answer
  • Assume there is a variable , h already associated with a positive integer value. Write the code necessary to count the number of
    13·1 answer
  • The program used to create the file where you want to insert the object is called the ____.
    12·1 answer
  • Consider the following skeletal C program: void fun1(void); /* prototype */ void fun2(void); /* prototype */ void fun3(void); /*
    11·1 answer
  • Before performing a Web Recorder task, which two options should the user ensure are setup correctly?
    6·2 answers
  • Jason is working on a project that requires him to manage a huge amount of data. The spreadsheet he is working on has data relat
    15·1 answer
  • Deb needs to add borders on the cells and around the table she has inserted into her Word document.
    7·1 answer
  • 1. Which one of the following is true about screening interviews?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!