Your question is Find FLAMES Between Two Names. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
The College Board SAT Suite may need a small string-processing utility for profile-name experiments. Given two names, compute their traditional FLAMES result after removing matching letters.
Normalize both names by converting letters to lowercase and ignoring spaces, punctuation, and other nonalphabetic characters. Cancel matching letters with multiplicity: each occurrence in one name can cancel at most one occurrence of the same letter in the other name. Let k be the total number of uncanceled letters across both names.
Use k to eliminate entries from the circular list ['F', 'L', 'A', 'M', 'E', 'S']. Starting at index 0, remove the kth remaining entry, counting the current entry as 1. Continue counting from the position immediately after each removed entry until one entry remains.
Return the remaining FLAMES letter. If k is zero, return "NONE".
name1 and name2."NONE" when no letters remain.def flames_result(name1, name2):