Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+5 votes

Just got an error on moodle saying function 'nickname' is too
Long. Its strange I shouldn't be getting this error. Should I try making
my function shorter?

asked in CSC201 Spring 2021 by (1 point)

2 Answers

+3 votes

I think you have too many if Elif and else functions or you have allocated the nickname to a variable and returning the variable instead of nickname which is what is defined by the function.

answered by (1 point)
+2 votes

I had the same error and it comes from too many elif statements. Just change the last one to an else statement and it will fix the problem.

answered by (1 point)
...