+ 1
Error in my code
When I run the code and I write "n" so I stop adding names in my guest list, it runs twice or three times the function, instead of breaking the while loop inside the function. What am I doing wrong? https://code.sololearn.com/cq37hK6GfR9W/?ref=app
3 Answers
+ 2
You are using recursion. When you input y, you are calling invitations() a new call to function itself.. So if you input y 10 times then you will repeats this 10 times... What is your y input do there? and
also before input q you have a call invitation() line34 and after input to q as 2 then again will produce more recursive calls.
+ 1
Jayakrishnaš®š³ thanks!!!
0
Btw for some reason in solo learn doesn't work. Try testing the code in vs code or smth