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.
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
Subreddit
Post Details
- Posted
- 3 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/Programming...