answer.
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
lana66690
1 month ago
9

Write a program that uses the function isPalindrome given in Example 6-6 (Palindrome). Test your program on the following string

s:
madam, abba, 22, 67876, 444244, trymeuemyrt

Modify the function isPalindrome of Example 6-6 so that when determining whether a string is a palindrome, cases are ignored, that is, uppercase and lowercase letters are considered the same.

The isPalindrome function from Example 6-6 has been included below for your convenience.

bool isPalindrome(string str)
{
int length = str.length();
for (int i = 0; i < length / 2; i++) {
if (str[i] != str[length – 1 – i]) {
return false;
} // if
} // for loop
return true;
}// isPalindrome

Your program should print a message indicating if a string is a palindrome:

madam is a palindrome
Computers and Technology
You might be interested in
Which is among the earliest formats of audio used in video games? A. MP3 B. wave table synthesis C. pulse code modulation D. MOD
Harlamova29_29 [1022]

Answer:

MOD

Explanation:

The MOD audio file format is primarily designed to represent musical content. It employs the.MOD file extension and is notably recognized as background music in various independent video games. It can be said that MOD audio file types are among the most widely used trackers in numerous computer games and demos.

0 0
3 months ago
Read 2 more answers
Which two statements are true regarding the user exec mode? (choose two.)?
Natasha_Volkova [1026]
<span>To enter global configuration mode, you need to type the enable command.</span><span>
The prompt indicating this mode concludes with the ">" symbol.</span>
8 0
2 months ago
A company is performing an analysis on the computers at its main office. The computers are spaced along a single row. The analys
oksian1 [950]

Answer:

array = input("Enter the list of computer memory: ").split(',')

int_arr = [int(x) for x in array]

segment = int(input("Enter the length of segment to analyze: "))

list_len = len(int_arr)

segList = []

mini = []

for x,i in enumerate(int_arr):

   seg = int_arr[i-1:segment+i-1]

   if len(seg) == segment:

       segList.append(seg)

for x in segList:

   mini.append(min(x))

result = mini.index(min(mini))

print("Segment with the minimum memory is: ",segList[result])

Explanation:

This Python program outputs the segment after evaluating, which has the lowest disk storage space. It collects the computer memory array based on user input and divides it according to the specified segment length, then compares the minimum across all segments.

5 0
4 months ago
A computer can successfully ping outside the local network, but cannot access any world wide web services. what is the most prob
amid [951]
<span>Port 80 is being blocked by the Windows Firewall.</span>
7 0
4 months ago
Other questions:
  • Light travels at 3 × 108 meters per second. A light-year is the distance a light beam travels in one year.Write a PYTHON program
    14·1 answer
  • Define a function PrintFeetInchShort, with int parameters numFeet and numInches, that prints using ' and " shorthand.
    9·1 answer
  • Write the definition of a function printAttitude, which has an int parameter and returns nothing. The function prints a message
    14·1 answer
  • Team A found 342 errors during the software engineering process prior to release. Team B found 184 errors. What additional measu
    12·1 answer
  • Suggest how the following requirements might be rewritten in a quantitative way. You may use any metrics you like to express the
    7·1 answer
  • A company has deployed four 48-port access layer switches to a switch block. For redundancy each access layer switch will connec
    14·1 answer
  • There are two circular grounds Ground-A and Ground-B. Ground-A is having diameter of 15 meters and Ground-B is having diameter o
    7·1 answer
  • In order to protect your computer from the newest viruses, which of the following should you do after you’ve installed virus sca
    13·1 answer
  • [20 POINTS] Jaime has to configure the dmz network of his organization to the optimum level. Which is the best practice to do so
    7·2 answers
  • (Displaying a Sentence with Its Words Reversed) Write an application that inputs a line of text, tokenizes the line with String
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!