Minor correction for #7: You probably want to say “nonempty quine” or “nontrivial quine”. The trivial quine works in many languages.
My nontrivial answer for Q7, in Python:
with open(“foo.py”, “r”) as foo: print foo.read()
And for Q8:
def f(string): return ″.join([chr(ord(c)+1) for c in string])with open(“foo.py”, “r”) as foo: print f(foo.read())
Minor correction for #7: You probably want to say “nonempty quine” or “nontrivial quine”. The trivial quine works in many languages.
My nontrivial answer for Q7, in Python:
with open(“foo.py”, “r”) as foo:
print foo.read()
And for Q8:
def f(string):
return ″.join([chr(ord(c)+1) for c in string])
with open(“foo.py”, “r”) as foo:
print f(foo.read())