#which country you in thomas

1 messages · Page 1 of 1 (latest)

empty mist
#

United Kingdom

inner hatch
#

nice

#

i think im gonna be a software engineer. what are your thoughts on that

empty mist
#

If its not in games, you'll get more money for sure

#

if money is your main driving factor

inner hatch
#

i mean, i love coding

#

and the money part is just a fact that i cant ignore tho

empty mist
#

I hated coding when i first started

#

And now it's the most thing i enjoy

inner hatch
#

i look at it as an expressing your thoughts on computer which is a physical thing

empty mist
#

Yea thats a good outlook

inner hatch
#

like, you can show you mom whats going on in your brain

#

like i did when i was in middle school

empty mist
#

My mother still lives in the bronze age, has no idea

inner hatch
#

haha

#

im not a professional coder but i can still do some stuff my 1 month ago self would get be suprised

#

i improved a lot just by searching how to do stuff on internet, and i have the mindset of it

empty mist
#

I was fresh out of university 2 years ago, made a couple game,s 2 on steam and now i work in industry (Very much not a professional)

inner hatch
#

haha

#

like i was thinking to myself 'how can i do this code, its impossible for me' a week ago

#
def square(num: int):
    return num*num

def PrimeCheck(num: int):
    for n in range(2, num-1):
        if num % n == 0:
            return False
    return True

def NextPrime(num: int):
    temp = num+1
    while not PrimeCheck(temp):
        temp += 1
    return temp


class SquareRoot:
    def __init__(self, number: int):
        self.number = number
        self.outOfRoot = 1
        self.Imaginary = False

        if int(self.number) < 0:
            self.Imaginary = True
            self.number = -self.number

        prime = 1

        while square(prime) <= self.number:
        
            if self.number % square(prime) == 0:
                self.outOfRoot *= prime
                self.number /= square(prime)
                prime = 1
            prime = NextPrime(prime)
        self.number = int(self.number)


    # def __add__(self, other):
    #     pass

    def __mul__(self, other: int):
        tempSelf = self
        tempSelf.outOfRoot = self.outOfRoot * other
        return tempSelf

        #if type(other) == SquareRoot, o ise de gir


    def __str__(self):
        
        if self.outOfRoot == 1:
            outOfRootShown = ""
        else:
            outOfRootShown = self.outOfRoot
        
        if self.number == 1:
            numberShown = ""
        elif self.Imaginary:
            numberShown = f"i√{self.number}"
        else:
            numberShown = f"√{self.number}"

        return f"{outOfRootShown}{numberShown}"


    def displayInRoot(self):
        tempSelf = self        
        tempSelf.number = tempSelf.number * square(tempSelf.outOfRoot)
        tempSelf.outOfRoot = 1
        return tempSelf

# x = SquareRoot(32)

# print(x)```
#

did something about squareroots and such

#

and its still a step of the real thing im trying to do

#

its on python

#

but i think im gonna go for c# when im done with python, like fully knowledge of all the things

empty mist
#

I only have experience with c# and java