Question: 5. Write a script which receives a list of parameters. If no parameters are received, output an error message. Otherwise, iterate through the list and,

 5. Write a script which receives a list of parameters. If

5. Write a script which receives a list of parameters. If no parameters are received, output an error message. Otherwise, iterate through the list and, using a case statement, test each item in the list to see ifit starts with a capital letter, lower case letter, digit or other. Count each type and output at the end the total for each category (capital, lower case, digit, other) 6. Write a script to input a list of positive numbers from the user using a while loop (exit the loop upon a negative number), storing each input as an array element. Using a for loop iterate through the list and compute the sum, average, maximum and minimum elements in the array. Output these results. 7. Write a script to determine if a parameter supplied to the script is a palindrome or not. A To accomplish this, you palindrome is a string that reads the same forward and backward. will need to loop from 0 to the halfway point in the string and compare the character at location i to the character at location length -i- 1 where length is the length of the string. If, after passing halfway through, the two compared characters match in each iteration, then output the parameter and that it is a palindrome, else output the parameter and that it is nota palindrome 8, Create a script containing a function of the code defined in #7 and code after the function that defines an array of several strings, some of which are palindromes and some of which are not and then code to iterate through the array, calling the palindrome function passing each array element as a parameter 5. Write a script which receives a list of parameters. If no parameters are received, output an error message. Otherwise, iterate through the list and, using a case statement, test each item in the list to see ifit starts with a capital letter, lower case letter, digit or other. Count each type and output at the end the total for each category (capital, lower case, digit, other) 6. Write a script to input a list of positive numbers from the user using a while loop (exit the loop upon a negative number), storing each input as an array element. Using a for loop iterate through the list and compute the sum, average, maximum and minimum elements in the array. Output these results. 7. Write a script to determine if a parameter supplied to the script is a palindrome or not. A To accomplish this, you palindrome is a string that reads the same forward and backward. will need to loop from 0 to the halfway point in the string and compare the character at location i to the character at location length -i- 1 where length is the length of the string. If, after passing halfway through, the two compared characters match in each iteration, then output the parameter and that it is a palindrome, else output the parameter and that it is nota palindrome 8, Create a script containing a function of the code defined in #7 and code after the function that defines an array of several strings, some of which are palindromes and some of which are not and then code to iterate through the array, calling the palindrome function passing each array element as a parameter

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!