this post was submitted on 18 Mar 2024
1 points (100.0% liked)

GenZedong

4287 readers
12 users here now

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:

founded 4 years ago
MODERATORS
 

Welcome again to everybody! Make yourself@home. In the time-honoured tradition of our group, here is the weekly discussion thread.

Matrix homeserver and space
Theory discussion group on Matrix
● Find theory on ProleWiki, marxists.org, Anna's Archive and libgen; audio versions by Socialism For All

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 0 points 7 months ago* (last edited 7 months ago) (1 children)

Fixed it now!

def Fmmin():
    for n in range(2, number):
        if number % n == 0:
            return n
        if n == number - 1 and number - 1 % n != 0:
            return 0
def Fmmax():
    for n in range(number-1, 1, -1):
        if number % n == 0:
            return n
        if n == 2 and number % n != 0:
            return 0
[–] [email protected] 0 points 7 months ago

one more piece of advice: try to avoid global variables when possible (in this case, you could pass number as an argument instead)