Home /
Expert Answers /
Computer Science /
34-simon-says-34-is-a-memory-game-where-34-simon-34-outputs-a-sequence-of-10-characters-r-g-b-y-pa316
(Solved):
"Simon Says" is a memory game where "Simon" outputs a sequence of 10 characters \( (R, G, B, Y) \) ...
"Simon Says" is a memory game where "Simon" outputs a sequence of 10 characters \( (R, G, B, Y) \) and the user must repeat the sequence. Create a for loop that compares the two strings starting from index 0 . For each match, add one point to userScore. Upon a mismatch, exit the loop using a break statement. Assume simonPattern and userPattern are always the same length. Ex: The following patterns yield a userscore of 4 : simonPattern: RRGBRYYBGY userPattern: RRGBBRYBGY \( 438762.2999956 .9 \times 329 y 7 \)