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
Alex787 [66]
3 years ago
12

Write a function check_palindrome that takes a string as an input and within that function determines whether the input string i

s a palindrome or not (a word or phrase that is read the same forward as it is backward - i.e. kayak, dad, etc.). If it is a palindrome, return 'Hey! That's a palindrome!' If it is not a palindrome, return 'Bummer. Not a palindrome.' Remember that you created a function that can reverse a string above.
Computers and Technology
1 answer:
Setler79 [48]3 years ago
3 0

Answer:

The function in Python is as follows:

def check_palindrome(strn):

   retstr = "Bummer. Not a palindrome."

   if strn[len(strn)::-1] ==strn:

       retstr = "Hey! That's a palindrome!"

       

   return retstr

Explanation:

This defines the function

def check_palindrome(strn):

This sets the return string to not a palindrome

   retstr = "Bummer. Not a palindrome."

This checks if the original string and the reversed string are the same

   if strn[len(strn)::-1] ==strn:

If yes, the return string is set to palindrome

       retstr = "Hey! That's a palindrome!"

This returns the expected string

   return retstr

<em>The function to reverse the string is not given; and the programming language. So, I solve the question without considering any function</em>

You might be interested in
Create html code showing heading tags​
kow [346]

Answer:

Assuming you mean the HTML5 head tag, then this may work for you:

<!DOCTYPE HTML>

<html lang="en">

<head>

<title>My Very Awesome Website</title>

<link href="./css/main.css" rel="stylesheet"  />

<meta name="viewport" content="width=device-width, initial-scale=1" />

</head>

<body>

<h1>Hey look</h1>

<p>This is my awesome website!</p>

<h3>Note</h3>

<p>This website is supposed to be 100% awesome!</p>

</body>

</html>

3 0
2 years ago
HELP ME ILL GIVE BRAINLY Input 50 numbers and then output the average of the negative numbers only. Write in pseudocode!
Mumz [18]

Answer:

The explanation is for 10 inputs though. You'd have to follow these steps to find input 50 numbers.

Explanation:

This is how I wrote it in the Plain English programming language which looks like pseudo-code but compiles and runs (to save you all the rest of the steps):

To run:

Start up.

Write "Enter 10 numbers separated by spaces: " on the console.

Read a reply from the console.

Loop.

If the reply is blank, break.

Get a number from the reply.

Add 1 to a count.

Add the number to a total.

Repeat.

Write "The total is: " then the total on the console.

Put the total divided by the count into an average.

Write "The average is: " then the average on the console.

Refresh the screen.

Wait for the escape key.

Shut down.

3 0
3 years ago
What might happen if dispatchable threads were removed from the software hierarchy? A. Requests from the mouse would be ignored.
Goryan [66]
So the question ask on which of the following among the choices might happen if dispatchable threads were removed from the software hierarchy and the best answer among your choices is letter D. Background program would be dropped. I hope you are satisfied with your answer 
4 0
3 years ago
Which systems provide a single, cohesive platform
sergejj [24]

Answer:

ERP systems provide a single, cohesive platform

Explanation:

“ERP means Enterprise Resource Planning”. ERP is One solution for all the business need. It is a software(Business process management software) which does various functions and gives one single application for running all the process of the organization. It shares a common Database which “enables the user to perform multiple task” from multiple location.

ERP module includes Supply chain management, financials, online sales, decision support system, warehouse management, human resource, CRM, etc. Using ERP we can increase the interaction among the staff, reduce labor cost, etc.

6 0
3 years ago
What is a bitmap ???
leva [86]
<span>a representation in which each item corresponds to one or more bits of information, especially the information used to control the display of a computer screen.
</span><span>represent (an item) as a bitmap.
</span>
4 0
3 years ago
Read 2 more answers
Other questions:
  • What command would you use to list the text files in your
    7·1 answer
  • A user wants to make sure he can quickly restore his computer after a drive failure to the state it was in when Windows and all
    9·1 answer
  • .____________ is a way to identify and differentiate goods andservices through use of a name or distinctive design element.
    10·1 answer
  • Allison’s computer is displaying a strange error message saying that Allison, who is an administrator, does not have access to a
    15·1 answer
  • The invention of the transistor was important to the development of computers because
    14·1 answer
  • What is the easiest way to create a resume in Word with predefined content that can be replaced with your information?
    13·2 answers
  • 6 external parts of computer
    10·2 answers
  • What is the output of the code snippet given below?string s = "abcde";int i = 1;while (i &lt; 5){ cout &lt;&lt; s.substr (i, 1);
    11·1 answer
  • Which These operating systems use a graphical user interface?
    6·1 answer
  • What does it mean to say that data in an Excel table is “dynamically linked” to a chart? What are the advantages of this feature
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!