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
Advantage of social media for today'​
Lyrx [107]

Answer:

This social media advantage helps your business in numerous ways: You get to know them better: When you know your audience better, you can deliver more valuable content to them. ... You provide better customer service: A direct connection with your audience allows you to resolve issues easier

Explanation:

(happy to help)

6 0
3 years ago
Some programming languages permit arbitrary flow of control from any place in a program to any other place in the program. Not J
liraira [26]
Besides portability, another of Java's key advantages is its set of security features which protect a PC running a Java program not only from problems caused by erroneous code but also from malicious programs (such as viruses). You can safely run a Java applet downloaded from the Internet, because Java's security features prevent these types of applets from accessing a PC's hard drive or network connections. An applet is typically a small Java program that is embedded within an HTML page.
4 0
3 years ago
Which of the following represents data selected from interviews, surveys, and other communications initiated by the researcher?
Flura [38]
The answer would be digital data
7 0
4 years ago
Interactive television with video-on-demand capabilities changes how people watch television and how consumers access the Intern
Alex787 [66]

Answer:

High learning

Explanation:

High Learning means that a product require significant customer education before customers understand how the product functions and that may make the product stay longer in the introduction stage whilst the customers are being familiarize with it. Examples are microwave ovens.

6 0
3 years ago
Write an app that reads an integer, then determines and displays whether the integer is odd or even. [Hint: Use the remainder op
Sholpan [36]

Answer:

#include <stdio.h>// header file

int main() // main function definition

{

   int number; // variable declaration

   scanf("%d",&number); // user input for number

   if(number%2==0) // check the number to even.

   printf("Number is a even number"); // print the message for true value

   else

   printf("Number is a odd number"); // print the message for false value.

   return 0; // return statement.

}

Output:

  • If the user inputs is 2 then the output is "Number is a even number".
  • If the user inputs is 3 then the output is "Number is a odd number".

Explanation:

  • The above program is to check the even and odd number.
  • The first line of the program is used to include the header file which helps to understand the functions used in the program.
  • Then there is the main function that starts the execution of the program.
  • Then there is a variable declaration of number which is declared as an integer which takes the integer value because the program needs the integer only.
  • Then the scanf function is used to take the inputs from the user.
  • Then the if condition check that the number is divisible by 2 or not.
  • If it is divisible print "even number" otherwise print "odd-number".
8 0
4 years ago
Other questions:
  • A(n) _____ allows unauthorized entry into a wireless network.
    8·1 answer
  • Which of the following statements is true of intrapreneurs
    15·1 answer
  • Once you record your audio and click ok to save it what happens to the recording?
    9·1 answer
  • Save As .csv .html Worksheet tab Format Cells SUM Function Destination cell Home tab AutoFit A. Applies a border or shading to s
    6·1 answer
  • To display the entire entry for a calculated field, select the column in the Field row, right-click to display the shortcut menu
    15·1 answer
  • Which of the following is NOT an argument used to determine how a shot is fired from an A. object the shot itself being instanti
    12·1 answer
  • Two-dimensional random walk (20 points). A two-dimensional random walk simulates the behavior of a particle moving in a grid of
    14·1 answer
  • To uncompress the data back into its original binary state. True or False
    13·1 answer
  • What is the function of the operating system of a computer?
    14·1 answer
  • There is a group of 10 people who are ordering pizza. If each person gets 2 slices and each pizza has 5 slices, how many pizzas
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!