Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

0
Homework help
Post Flair (click to view more posts with a particular flair)
Post Body

I have been struggling on this for some time now. We are on the chapter addressing loops.

“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 each character of the two strings. For each matching character, add one point to user_score. Upon a mismatch, end the loop.

user_score = 0 simon_pattern = input () user_pattern = input ()

for s in simon_pattern: for u in user_pattern: if s == u: user_score = 1 else: break

print(“User score: “, user_score)

Lines 1, 2, 3, and 12 are not changeable I just want to understand what I am missing because I have got numbers all over the map dancing around the correct answer

Duplicate Posts
5 posts with the exact same title by 4 other authors
View Details
Author
Account Strength
100%
Account Age
11 years
Verified Email
Yes
Verified Flair
No
Total Karma
17,864
Link Karma
560
Comment Karma
16,957
Profile updated: 1 day ago
Posts updated: 1 year ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
3 years ago