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
Mekhanik [1.2K]
3 years ago
15

A palindrome is a word or phrase that reads the same both backward and forward. The word ""racecar"" is an example. Create an al

gorithm (sequence of steps) to determine if a word or phrase is a palindrome. Try several different words or phrases to ensure your algorithm can detect the existence of a palindrome properly.
Computers and Technology
1 answer:
oee [108]3 years ago
4 0

Answer:

Algorithm for the above problem:

  1. Take a string from the user input.
  2. store the input string on any variable.
  3. Reverse the string and store it on the other variable.
  4. Compare both strings (character by character) using any loop.
  5. If all the character of the string matched then print that the "Input string is a palindrome".
  6. Otherwise, print "The inputted string is not a palindrome."

Output:

  • If the user inputs "ababa", then it prints that the "Input string is palindrome"
  • If the user inputs "ababaff", then it prints that the "Input string is not palindrome"

Explanation:

  • The above-defined line is a set of an algorithm to check the number is palindrome or not.
  • It is defined in English because the algorithm is a finite set of instructions written in any language used to solve the problem.
  • The above algorithm takes input from the user, compare that string with its reverse and print palindrome, if the match is found.
You might be interested in
Which of the following are examples of structured data?
Burka [1]

Answer:taffif

Explanation:

4 0
4 years ago
Problem 8 - Recursive Divisible by 3 and 5 Complete the divBy3And5 function which accepts a list of integers. The function shoul
slavikrds [6]

The recursive function divBy3And5 is defined in Python and is found in the attached image.

In the base case, the function divBy3And5 tests if the input list is empty. If so, the tuple returned is (0, 0). This means no numbers are divisible by three and no numbers are divisible by five.

The recursive step gets the first element of the list and

  • If divisible by 3, it sets <em>count_of_3</em> to 1, else it leaves it as 0
  • If divisible by 5, it sets <em>count_of_5</em> to 1, else it leaves it as 0

It then makes a recursive call on the remaining elements, and stores it in a variable as follows

   <em>divBy3And5_for_remaining_elem</em> = divBy3And5(remaining_elements)

Then, it returns the tuple

       (<em>divBy3And5_for_remaining_elem</em>[0] + <em>count_of_3</em>,

                <em>divBy3And5_for_remaining_elem</em>[1] + <em>count_of_5)</em>

Learn more about recursion in Python: brainly.com/question/19295093

5 0
2 years ago
ANSWER THIS CORRECTLY FOR BRAINLIEST
jeka57 [31]
The answer is https it is on Every url
6 0
3 years ago
Read 2 more answers
A recursive definition is a definition:____.
saveliy_v [14]
The correct answer is D
6 0
3 years ago
Carly wants to be able to look at a document without having to use the horizontal scroll bar located on the bottom of the screen
Leno4ka [110]

Answer:

I think it's "Carly will set the page to Page Width, and Rhianna would zoom to 150%." If Carly doesn't want to use the zoom thingy, then she probably would just change the page orentation (idk if I spelled that right). Rhianna wants to zoom in, so that's why I said that. It's either "A" or "C."

Explanation:

I hope this helps!

5 0
3 years ago
Other questions:
  • Show what this program prints. Be exact and complete. Can you explain the behavior of each print statement? 1 2 3 4 5 6 7 public
    12·1 answer
  • Is it save too say that any job you apply for or are eligible for has to have some type of technology?
    6·2 answers
  • A university wants to install a client-server network. Which feature do you think is important for them as they set up the netwo
    7·1 answer
  • Does anyone want to play 2k21 or rocket league on xbox my username is Bud zecaog
    13·2 answers
  • What internet access technology currently uses a technology called 4G?
    13·1 answer
  • A store that has both an e-commerce site as well as a physical store (building) is known as:
    8·1 answer
  • In the circuit shown in the figure above, what will happen when switches S1 and S3 are both closed? 
    8·1 answer
  • "In a web app, where is data usually stored? A. Mobile network B. Application storage C. Local computer D. Cloud storage"
    14·1 answer
  • You have been hired by a small company to install a backbone to connect four 100base-T Ethernet LANs (each using one 24-port hub
    12·1 answer
  • Is a mainframe computer portable?​
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!