user:amalgamated_marks
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| user:amalgamated_marks [2025/01/13 06:31] – appledog | user:amalgamated_marks [2025/01/13 06:32] (current) – appledog | ||
|---|---|---|---|
| Line 4: | Line 4: | ||
| < | < | ||
| t = [0 for _ in range(50)] | t = [0 for _ in range(50)] | ||
| - | | + | |
| # array of marks goes here | # array of marks goes here | ||
| - | a = [ | + | a = [ " |
| - | | + | |
| - | ] | + | |
| for m in a: | for m in a: | ||
| if ':' | if ':' | ||
| m, p = m.split(':', | m, p = m.split(':', | ||
| - | | + | |
| - | p = int(p) | + | |
| - | t[m] = t[m] + p | + | |
| else: | else: | ||
| if m > 0: | if m > 0: | ||
| - | t[m] = t[m] + 1 | + | t[m] = += 1 |
| else: | else: | ||
| - | | + | t[abs(m)] -= 1 |
| for x in range(50): | for x in range(50): | ||
| print (str(x) + ", " + str(t[x])) | print (str(x) + ", " + str(t[x])) | ||
| </ | </ | ||
user/amalgamated_marks.1736749882.txt.gz · Last modified: by appledog
