user:amalgamated_marks
Differences
This shows you the differences between two versions of the page.
| user:amalgamated_marks [2026/04/14 06:09] – created appledog | user:amalgamated_marks [Unknown date] (current) – external edit (Unknown date) 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | = Amalgamated Marks | ||
| + | == Python Program | ||
| + | < | ||
| + | t = [0 for _ in range(50)] | ||
| + | |||
| + | # array of marks goes here | ||
| + | a = [ " | ||
| + | |||
| + | for m in a: | ||
| + | if ':' | ||
| + | m, p = m.split(':', | ||
| + | t[int(m)] += int(p) | ||
| + | else: | ||
| + | if m > 0: | ||
| + | t[m] = += 1 | ||
| + | else: | ||
| + | t[abs(m)] -= 1 | ||
| + | |||
| + | for x in range(50): | ||
| + | print (str(x) + ", " + str(t[x])) | ||
| + | </ | ||
