+ 1
plz tell me why isnt this decorator working
7 Respostas
0
https://code.sololearn.com/czL8KqVbHSRT/?ref=app
There was just a bunch of extra stuff in there. This works
+ 1
It works just fine. I copy and pasted in a python environment though. Not sure if that made a difference as yours is in swift
+ 1
Slick yeah man it does....thank u...but wt was incorrect bout my code
+ 1
Its those return calls. They are basically used to make a function equal a value.
The functions you wrote dont hold a value. They just print a message if a condition is met.
But, when i returned the length of the name in the first function, it made the first function == 10 (with that name as the parameter).
Then you were free to basically use the "func" parameter IN the second function as the number 10, because thats what it equals.
Thats where i get the line:
if func >= 10:
...
+ 1
ohh...i got it....thank you Slick