[-] DeHuq2@lemmygrad.ml 2 points 6 months ago* (last edited 6 months ago)

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
[-] DeHuq2@lemmygrad.ml 2 points 6 months ago

I figured it out! I just needed to use break.

num = []
Ms = []
def Fmmin(va):
    while va == 0:
        for n in range(2, number):
            if number % n == 0:
                va = n
                break
            if n == number - 1 and number - 1 % n != 0:
                va = '0'
    return va
def Fmmax(va):
    while va == 0:
        for n in range(number-1, 1, -1):
            if number % n == 0:
                va = n
                break
            if n == 2 and number % n != 0:
                va = '0'
    return va

for f in range(1,10000000):
    number = 452021 + f
    mmin = 0
    mmax = 0
    mmin = Fmmin(mmin)
    mmax = Fmmax(mmax)
    if int(mmax) > 0 and int(mmin) > 0:
        M = mmax + mmin
        if M % 7 == 3:
            num.append(number)
            Ms.append(M)
    if len(num) >= 5:
        break
print(Ms)
print(num)
[-] DeHuq2@lemmygrad.ml 4 points 6 months ago* (last edited 6 months ago)
num = []
Ms = []
while len(num) <= 5:
    for f in range(1,1000000):
        a = 452021 + f
        mmin = 0
        mmax = 0
        while mmin == 0:
            for n in range(2,a-1):
                if a % n == 0:
                    mmin = n
                if n == a-1 and a % n != 0:
                    mmin = '0'
        while mmax == 0:
            for n in range(a-1,2,-1):
                if a % n == 0:
                    mmax = n
                if n == 2 and a % n !=0:
                    mmax = '0'
        M = int(mmax) + int(mmin)
        if M % 7 == 3:
            num.append(a)
            Ms.append(M)
print(Ms)
print(num)
[-] DeHuq2@lemmygrad.ml 2 points 6 months ago* (last edited 6 months ago)

What did I do wrong? I could look up proper solution to this exercise but I would still like to know what exactly is off. I feel like its something super obvious and stupid.

12
submitted 11 months ago* (last edited 11 months ago) by DeHuq2@lemmygrad.ml to c/genzedong@lemmygrad.ml
1
submitted 11 months ago by DeHuq2@lemmygrad.ml to c/news@hexbear.net

cross-posted from: https://lemmygrad.ml/post/2178431

What are the general trends, public's opinion on latest events, local, global, Ukraine. Is there something of note happening in your country, both good and bad?

63
submitted 1 year ago by DeHuq2@lemmygrad.ml to c/memes@lemmygrad.ml
2
submitted 1 year ago by DeHuq2@lemmygrad.ml to c/memes@lemmygrad.ml
[-] DeHuq2@lemmygrad.ml 1 points 1 year ago

And anyone trying to stop the suffering is eeevil~. I seriously don't know why they thought it would portray bolsheviks in a bad light.

[-] DeHuq2@lemmygrad.ml 3 points 1 year ago

Shouldn't removing Jesus from his torture device be a good thing? I could never understand the logic behind worshipping the thing that killed and subjected their god to pain.

1
0

I am interested in learning of his policies, what he said and did, state of the left movement in Belarus as well as position of the country on the world stage and in the eyes of the non-western countries.

[-] DeHuq2@lemmygrad.ml 0 points 1 year ago* (last edited 1 year ago)

You know, this thing would have been cool as an Indoors wall thingy in malls and such, since algae doesn't need as much maintenance as houseplants and would produce more oxygen too. Placing the tank outside is a strange decision, it simply doesn't match with the streets stylistically or functionally and will require regular repairs and cleaning from damages of the elements and filth that would accumulate at extreme speeds.

[-] DeHuq2@lemmygrad.ml 1 points 2 years ago

Lol the comments going like "what are we, a bunch of commies?" are cracking me up

[-] DeHuq2@lemmygrad.ml 1 points 2 years ago

Who the fuck buys canned water

DeHuq2

joined 2 years ago