[ prog / sol / mona ]

prog


[challenge] Try to rewrite SICP [urgent]

5 2022-08-16 03:26

Shit, I forgot something extremely important. Since Abelson knows which character was in SICP at a given position, he will of course be nice enough to tell you what the character actually was if you guessed wrong. That's how you can try to predict what the next character is. That's the whole point, sorry. So here's an updated Abelson:

#!/usr/bin/python
from pathlib import Path
import sys
sicp = Path('sicp.md').read_text()
actual_char = sicp[int(sys.argv[1])]
if sys.argv[2] == actual_char:
        print("yes yes!")
else:
        print("nah, it was " + actual_char)
14


VIP:

do not edit these