Initial commit
Test (in pplus-core) / in-core (push) Failing after 28m44s

This commit is contained in:
alexm committed 2026-11-12 22:23:48 -05:00
commit 568474d52f
1591 files changed
+528213

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
# probe: shifting letters through an alphabet string with find()
# status: the expected output is Programming+'s interpreter's prediction; corpus.py verify confirms or refutes it on godbolt
# expect-stdout: khoor zruog
# expect-stdout: hello world
# expect-stdout: bcd
def shift(s: String, k: Int) -> String:
var alphabet = String("abcdefghijklmnopqrstuvwxyz")
var out = String("")
for i in range(s.count_codepoints()):
var c = String(s[codepoint=i])
var at = alphabet.find(c)
if at < 0:
out += c
else:
out += String(alphabet[codepoint=(at + k) % 26])
return out
def main():
var secret = shift("hello world", 3)
print(secret)
print(shift(secret, 23))
print(shift("xyz", 4))