Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Don't use loops if , else, while, find any conditionals or iterations MAATLAB Funntion: stringscore Input: (1xN char) A vector of chars Output: (double) The
Don't use loops if , else, while, find any conditionals or iterations MAATLAB
Funntion: stringscore Input: (1xN char) A vector of chars Output: (double) The score of the string as determined by the criteria below Function Description: You are given a string and need to write a function that determines its score based on the criteria listed below. - +5 points if the length of the string is even - 3 points if the length of the string is odd - +10 points if the length of the string is evenly divisible by the number of spaces in the string - +7 points if at least 5% of the letters in the string are capitalized - +50 points if after making all letters the same case and removing the spaces the string is a palindrome (same forward as it is backwards) Note(s): - The input string will only contain letters (upper and lower) and spaces. (No numbers or punctuations.) - Iteration and Conditionals are banned - The find() function is banned Hints: - Multiplying by a logical automatically casts it into a double (ex: false 0, true >1 ) Examples: str1 = 'Taco Cat
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started