top of page
Search

PYTHON CODING

  • Writer: waclaw_koscielniak
    waclaw_koscielniak
  • Jun 23
  • 1 min read

def factory(n):

return lambda x: x ** n

square = factory(2)

cube = factory(3)

print(square(3), cube(2))


[Running] python3 -u "/Users/name/test/test37.py"

9 8

[Done] exited with code=0 in 0.053 seconds


Did you guess it correctly?
Did you guess it correctly?

 
 
 

1 Comment


Guest
Jun 23

Did you try it?

Like
bottom of page