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
The __________ unit is capable of mimicking the processor and of taking over control of the system bus just like a processor
Elden [556K]

The unit which is capable of mimicking the processor and of taking over control of the system bus just like a processor is: C) direct memory access.

<h3>What is computer memory?</h3>

A computer memory can be defined as the available space on an electronic device that is typically used for the storage of data or any computer related information.

<h3>What is a CPU?</h3>

CPU is an abbreviation for central processing unit and it can be defined as the main components of a computer because it acts as the “brain” of a computer and does all the processing, calculations, and logical control.

In Computer technology, direct memory access simply refers to the unit which is capable of mimicking the computer's processor and taking over control of the system bus just like a processor.

Read more on processing unit here: brainly.com/question/5430107

#SPJ1

Complete Question:

The __________ unit is capable of mimicking the processor and of taking over control of the system bus just like a processor.

A) interrupt-driven I/O

B) I/O channel

C) direct memory access

D) programmed I/O

5 0
2 years ago
Which label belongs in the area marked Z? Producers Science Question
Bad White [126]
Idk dont  ask me i thank its c
5 0
3 years ago
Read 2 more answers
17. Ano ang tawag sa pahina ng Excel?
kompoz [17]

D

Explanation:

D.spread sheet

........,,............:-)

5 0
3 years ago
Write a program to compute answers to some basic geometry formulas. The program prompts the user to input a length (in centimete
Svetlanka [38]

Answer:

import math

l = float(input("Enter length in cm: "))

l = l / 100;

print("Entered length is " + str(l) + " meters")

area_square = l * l

print("Area of square is " + str(area_square))

area_circle =  math.pi * l/2 * l/2

print("Area of circle is " + str(area_circle))

volume_cube =  l * l * l

print("Volume of cube is " + str(volume_cube))

Explanation:

*The code is in Python

Ask the user to enter the length in cm

Convert the length to meters and print it

Calculate the area of the square and print it (Since length is equal to a side, the area is length * length)

Calculate the area of the circle and print it (Since length is equal to the diameter, you need to divide it by two to get the radius. The area is pi * length/2 * length/2)

Calculate the volume of the cube and print it (Since length is equal to a side, the volume is length * length * length)

4 0
3 years ago
Which skills will help Harry in the following scenario? Harry works in a software development company. He starts a new project f
Anuta_ua [19.1K]

Harry must apply  logical  Development and analytical thinking skills during planning.

<h3>How do you create or have analytical and logical skills?</h3>

The ways to improve one's  analytical skills are:

  • Read a lot.
  • Build on your mathematical skills.
  • Play brain or mind games.

Note that in the above case,  Harry must apply  logical  Development and analytical thinking skills during planning.

Learn more about skills from

brainly.com/question/25645043

#SPJ1

7 0
2 years ago
Other questions:
  • Explain in two or three sentences why health science careers are among the fastest growing careers in
    9·1 answer
  • When a primary key combines two or more fields, it is called a ____ key?
    5·1 answer
  • I can't find the errors! Could anyone help me please?!
    5·1 answer
  • Which network device regenerates the data signal without segmenting the network? modem?
    15·1 answer
  • Consider a two-link network where Host A is connected to the router by a 1 Mbps link with 10 ms propagation delay and the router
    6·1 answer
  • When you evaluate the use of digital media, how has it affected the newspaper business? The rise of digital media has caused new
    15·1 answer
  • Which describes the "Network Effect?
    10·1 answer
  • Python Coding:
    15·1 answer
  • In order to paint a wall that has a number of windows, we want to know its area. Each window has a size of 2 ft by 3 ft. Write a
    14·1 answer
  • In C++ please (read the image below for instructions)
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!