Answered step by step
Verified Expert Solution
Link Copied!

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

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

Privacy In Statistical Databases International Conference Psd 2022 Paris France September 21 23 2022 Proceedings Lncs 13463

Authors: Josep Domingo-Ferrer ,Maryline Laurent

1st Edition

3031139445, 978-3031139444

More Books

Students also viewed these Databases questions