"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: ex: the following patterns yield a userscore of 9: simonpattern: r, r, g, b, r, y, y, b, g, y userpattern: r, r, g, b, b, r, y, b, g, y
Get the answer
Category: computerinformation |
Author: Mona Eva
Related Questions
"since i am a preacher by calling, i suppose it is not surprising that

"sir, your highness (of portugal) should know how our kingdom is being

"six years ago hill city issued $10 million of 6% term bonds" the amou

Category
statistics
"skippy" an 20lb dog is being treated for an abscess. the dvm orders: amoxicillin 22mg/kg po bid x 14d. amoxicillin is available in 100mg, 200mg and
business
"skippy" an 20lb dog is being treated for an abscess. the dvm orders: amoxicillin 22mg/kg po bid x 14d. amoxicillin is available in 100mg, 200mg and
statistics
"slash-and-burn" was a method that early humans used for what purpose? a) agriculture b) metallurgy transportation d) writing