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
Which of the following does not reflect the second step of effective communication?
Ilya [14]

Answer:

c

Explanation:

3 0
3 years ago
Read 2 more answers
What two factors make up the skills of a good typist
Vikki [24]

Answer:

I feel to be a good typist one would have to have a good grasp of reading, grammar, and the ability to make errors to a lesser degree than more so. I can type, myself, 120-150 wpm with an error rate of 0-2. I also have the ability of not having to look at the keyboard as I type, and have a good eye on catching errors.

Explanation:

5 0
3 years ago
Why is script used for pre-production?
Grace [21]

Explanation:

Pre-production formally begins once a project has been greenlit. At this stage, finalizing preparations for production go into effect. Financing will generally be confirmed and many of the key elements such as principal cast members, director and cinematographer are set. By the end of pre-production, the screenplay is usually finalized and satisfactory to all the financiers and other stakeholders.

During pre-production, the script is broken down into individual scenes with storyboards and all the locations, props, cast members, costumes, special effects and visual effects are identified. An extremely detailed shooting schedule is produced and arrangements are made for the necessary elements to be available to the film-makers at the appropriate times. Sets are constructed, the crew is hired, financial arrangements are put in place and a start date for the beginning of principal photography is set. At some point in pre-production, there will be a read-through of the script which is usually attended by all cast members with speaking parts, the director, all heads of departments, financiers, producers, and publicists.

5 0
3 years ago
Read 2 more answers
You require an algorithm that will receive an integer from the screen, add 5 to it, double it, subtract 7 from it, and display t
UNO [17]

Answer:

The algorithm is as follows:

1. Start

2. Input num

3. num = num + 5

4. num = 2 * num

5. num = num - 7

6. Print num

7. Stop

Explanation:

The first and the last line of the algorithm starts and ends the algorithm

Line 2 gets user input;

Assume user input is 9

num = 9

Line 3: adds 5 to the inputted number

num = 9 + 5 = 14

Line 4 doubles the result of line 3

num = 2 * 14 = 28

Line 5 subtracts 7 from the result of 4

num = 28 - 7 = 21

Line 6 prints the output to the screen

Hence, the output of the algorithm is 21 if the user input is 9

7 0
3 years ago
Microsoft Word Module 3 the answers for online class University MIS
Artist 52 [7]

Answer:

Nope

Explanation:

You can use open office for free

7 0
3 years ago
Other questions:
  • Why is audio greyed out on powerpoint ms office 2011?
    10·1 answer
  • Which font attribute would be most appropriate to make a papers heading stand out?
    7·2 answers
  • Ally made the net below to find the surface area of a box she was designing. The box measures 12 centimeters long by 9 centimete
    7·1 answer
  • How do i build a supercomputer.?
    11·1 answer
  • The variable 'a' starts with the value 1 The variable 'b' starts with the value 10 The variable 'c' starts with the value 100 Th
    11·1 answer
  • Write a routine to interchange the mth and nth elements of a singly-linked list. You may assume that the ranks m and n are passe
    10·1 answer
  • VEE Physics 2006 E.C
    7·1 answer
  • At which track meet did two runners finish in a time equivalent to the mode?
    14·1 answer
  • Define a function print_feet_inch_short(), with parameters num_feet and num_inches, that prints using ' and " shorthand. End wit
    6·2 answers
  • Can someone please tell me what I’m doing wrong ? Please and it’s due on Thursday!!
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!