Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
HERES MINE:
import sys
class Cursed(type):
def new(cls, name, bases, attrs):
sys.stdout.write("".join(map(chr, [104, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100, 10])))
return super().new(cls, name, bases, attrs)
class _(import("builtins").object, metaclass=Cursed):
pass
def cursed_decorator(f):
exec("print('hello world')")
return lambda: None
@cursed_decorator
def totally_normal_function():
print("hello world")
(eval("import('builtins').exec"))("print('hello world')")
import types
bc = compile("print('hello world')", "", "exec")
types.FunctionType(bc, {}).call()
Here is my cursed code to print "hello world":
Enjoy ! :)
Nearly. Right idea though
This comment is hidden because it contains spoiler information about the solution
Hi.
I'm surprised by these two test cases that seem to contradict each other:
fn x => 0must raise an error according to the buttontest,fn one => 1must be a valid function with no arguments and always return 1 according to the attempt.In my opinion the first test case means 'a function must have a name' but in that case
xcould be considered to be the name of a function..Should the test case be modified?
How did you managed this?