59
General Discussion Thread - Juche 113, Week 12
(lemmygrad.ml)
This is a Dengist community in favor of Bashar al-Assad with no information that can lead to the arrest of Hillary Clinton, our fellow liberal and queen. This community is not ironic. We are Marxists-Leninists.
This community is for posts about Marxism and geopolitics (including shitposts to some extent). Serious posts can be posted here or in /c/GenZhou. Reactionary or ultra-leftist cringe posts belong in /c/shitreactionariessay or /c/shitultrassay respectively.
We have a Matrix homeserver and a Matrix space. See this thread for more information. If you believe the server may be down, check the status on status.elara.ws.
Rules:
I figured it out! I just needed to use break.
You can improve the code by returning
n
and0
respectively, no need to use a loop variable. Thewhile va == 0
is either unnecessary (if it runs once) or can cause an endless loop (since nothing changes between iterations)Fixed it now!
one more piece of advice: try to avoid global variables when possible (in this case, you could pass
number
as an argument instead)