Closures and the @ symbol — what AI is doing when it stacks decorators — step 8 of 9
Write a decorator called shout that takes a function returning a
string, calls it, and returns the result UPPERCASED with ! added
at the end. (A shout decorator makes things louder. That's what
the name promises.)
Then decorate a function say_hi that returns "hi" and print
the result.
Expected output:
HI!
⌘↵ runs the editor.read, then continue.
Write a decorator called shout that takes a function returning a
string, calls it, and returns the result UPPERCASED with ! added
at the end. (A shout decorator makes things louder. That's what
the name promises.)
Then decorate a function say_hi that returns "hi" and print
the result.
Expected output:
HI!
this step needs the editor
on desktop today; in the app (coming soon). save your spot and we'll bring you back here when you're ready.