O6: telemetry report and eval task set (#14)

This commit was merged in pull request #14.
This commit is contained in:
hermes committed 2026-11-13 00:19:52 +00:00
1 parent bea07e82bb
commit b2d72f2dc9
31 files changed
+809 -3

No files matched your search

+2
View File
@@ -0,0 +1,2 @@
def last_n(xs, n):
return xs[len(xs) - n + 1:]
+6
View File
@@ -0,0 +1,6 @@
from lib import last_n
assert last_n([1, 2, 3, 4], 2) == [3, 4]
assert last_n([1, 2, 3], 3) == [1, 2, 3]
assert last_n([1], 1) == [1]
print('ok')
+1
View File
@@ -0,0 +1 @@
python3 test_lib.py
+2
View File
@@ -0,0 +1,2 @@
def last_n(xs, n):
return xs[len(xs) - n:]
+3
View File
@@ -0,0 +1,3 @@
# Fix the off-by-one in last_n
`last_n(xs, n)` in `lib.py` must return the last n items of the list, but it returns one too few. Fix it. Do not change the tests.