+ 1
Positional arguments
Why do I need to put n on star? I couldnât find a clear answer online. def decor(func): def star(n): print("***") func(n) print("***") print("END OF PAGE") return star
3 Answers
0
Put N on star? Unless that is a typo, i think this is a misunderstanding. The print statements with asterisk strings are just visual bounding lines for the program userâs visual convenience, and are not essential to this code. Removing those print statements will not cause an error.
0
I meant putting n into the parenthesis of star
0
The parentheses of star? I dont see⊠oh, i thought you meant asterisk. OkâŠ
n is a parameter of the function star, which is being defined within the function decor. Decor takes func as an argument, star takes n as an argument and calls func on it.