Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

matlab only LAB ACTIVITY 23.43.1: Pangrams (Strings) This tool is provided by a

ID: 3602788 • Letter: M

Question

matlab only

LAB ACTIVITY 23.43.1: Pangrams (Strings) This tool is provided by a third party. Your activity is always recorded, but you may need to refresh the page to fill in the banner. 0/5 Pangrams A pangram, or holoalphabetic sentence, is a sentence using every letter of the alphabet at least once. Write a logical function isPangram to determine if a sentence is a pangram. Hint: The function should work with both upper and lower case. Restriction: Your function shoud use at least once the functions isspace, unique, and al The input string could be any length. For example >> s = "The quick brown fox jumps over the lazy dogs's answer=isPangram(s) answer = logical 1 >> s = "The quick brown '; answer=isPangram(s) answer = logical Your Function Save Reset MATLAB Documentation 1 function tf = 1sPangram(s) % Your code goes here 5 end;

Explanation / Answer

function tf = isPangram(s)
if isspace(s) == 1
s = strrep(s,' ','')
end
alphabets='a':'z'
tf = all(isempty(setdiff(alphabets,unique(lower(s)))))
end

Thanks a lot. Please let me know if you have any doubt.