Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

No Iterations or Conditionals or find() function MATLAB Funntion: stringscore Input: (1xN char) A vector of chars Output: (double) The score of the string as

No Iterations or Conditionals or find() function MATLAB

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Databases And Information Systems 22nd European Conference Adbis 2018 Budapest Hungary September 2 5 2018 Proceedings Lncs 11019

Authors: Andras Benczur ,Bernhard Thalheim ,Tomas Horvath

1st Edition

3319983970, 978-3319983974

Students also viewed these Databases questions

Question

1. Ask others what they mean by a specific term or phrase

Answered: 1 week ago