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]
2 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]2 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
When making an assembly of design what command is most.commonly used?
Schach [20]
There are two common command lines used in creating design assembly. The 'push' and 'pull' command. Both allows you to get parts from the original predelivered content's source desgian    and recreate the design faster and with less memory.
6 0
2 years ago
How are network computers different from traditional personal computers? describe some usage scenarios in which it is advantageo
Elanso [62]
A network computer depend on on a centralized computer for most of its services. It can consequently have a minimal operating system while a personal computer on the other hand has to be proficient of on condition that all of the required functionality in a detached manner without depending on a centralized manner. Scenarios where administrative costs are high and where sharing leads to more efficient use of resources are exactly those settings where network computers are preferred.
8 0
3 years ago
Microsoft Word cannot be used to create personalized web<br> pages.<br> OTrue<br> False
Georgia [21]

Answer:

False

Explanation:

Because Microsoft can be used to create personalized web

5 0
2 years ago
Which TWO of these correctly describe a Trojan horse malware?
mina [271]
The first one and last one
6 0
2 years ago
Read 2 more answers
Define a Python function called leng_of_str to calculate the length of a string (Hint: Do not use the len function to find the l
Slav-nsk [51]

Answer:

The code is attached.

Explanation:

  1. the function accepts string as a parameter
  2. inside fuction there is a caunter variable initialized 0
  3. for every character in the string counter increases by 1
  4. returns final value of i as an integer, which is also the length of the string given

7 0
3 years ago
Other questions:
  • Which one of these tasks best describes the process of localization?
    12·1 answer
  • What can you do with someone's ip address?
    9·1 answer
  • Learning about public speaking can help improve your ________________.
    15·1 answer
  • As a bank employee, you often work from home and remotely access a file server on the bank’s network to correct errors in financ
    8·1 answer
  • Create a static method called fillArray, which takes an integer array as an input parameter, along with an integer initial value
    12·1 answer
  • Information about hardware engineers?
    9·1 answer
  • HELPPPP KOKICHI IS OUT TO KILL ME
    11·1 answer
  • How do you customize calendar view​
    9·2 answers
  • write query for all products reutrn product name with its amounts due, paid, canceled, and refunded, order the result by product
    7·1 answer
  • Which insert image option allows a user to compile, modify, and add captions to images?
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!