Question
You have a big problem. In one of your CS courses, your professor decides that the only way you will pass the class is if
You have a big problem. In one of your CS courses, your professor decides that the only way you will pass the class is if you write a MATLAB function to get him out of a mess. All the grades in his class have been accidentally stored into one long string of characters containing only the letters A, B, C, D, F, and Y. a. Your job is to write a function called Crazy Grade that will take in the string and flip the grades according to the following specifications: A becomes F - B becomes D - C remains unchanged D becomes B - F becomes A - Y becomes W Your function should take in a string and return an inverted string. You may assume that the string will only consist of valid letter grades. For example, Crazy Grade ('BADDAD') should return 'DFBBFB' Crazy Grade ('BAYBAY') should return 'DFWDFW' b. To make matters worse, he wants you to organize this modified grade set. Write a function called GradeDist to bunch together all the similar grades (put all the AS next to each other, B'S next to each other , etc.) Then calculate and return the professors grade distribution. Your function should take in a string and return a string with all similar grades grouped together, along with an array containing percentage values from AS all the way to F'S. For example, if there are 15% A'S, 16% B'S, 33% C'S, 16% D'S, 16 F'S and 4% W'S, GradeDist should return [15 16 33 16 16 4]
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