Code Mafia: Interest Gauge.

This forum is for discussion related to the game.
User avatar
Accountant
Accountant
Jack of All Trades
User avatar
User avatar
Accountant
Jack of All Trades
Jack of All Trades
Posts: 6419
Joined: May 16, 2015
Location: Wonderland

Post Post #7 (isolation #0) » Tue Apr 19, 2016 3:27 pm

Post by Accountant »

Interested. Would pre-in if I could.
There's nothing that says that a fake can't beat the real thing.

You must not imagine that for beings like you and us there can be laughter. The low men laugh, and we envy them. But for us, the higher ones, there is no laughter, only an unending vigil, purely serious, stretching on into the night.
User avatar
Accountant
Accountant
Jack of All Trades
User avatar
User avatar
Accountant
Jack of All Trades
Jack of All Trades
Posts: 6419
Joined: May 16, 2015
Location: Wonderland

Post Post #10 (isolation #1) » Tue Apr 19, 2016 5:10 pm

Post by Accountant »

NO CODES IN MAFIA GAMES

But honestly this shouldn't be too difficult to write a simple program to calculate. Do we send in like a pastebin of our algo or...?
There's nothing that says that a fake can't beat the real thing.

You must not imagine that for beings like you and us there can be laughter. The low men laugh, and we envy them. But for us, the higher ones, there is no laughter, only an unending vigil, purely serious, stretching on into the night.
User avatar
Accountant
Accountant
Jack of All Trades
User avatar
User avatar
Accountant
Jack of All Trades
Jack of All Trades
Posts: 6419
Joined: May 16, 2015
Location: Wonderland

Post Post #13 (isolation #2) » Tue Apr 19, 2016 6:47 pm

Post by Accountant »

What's stopping someone from manually counting the brackets?
There's nothing that says that a fake can't beat the real thing.

You must not imagine that for beings like you and us there can be laughter. The low men laugh, and we envy them. But for us, the higher ones, there is no laughter, only an unending vigil, purely serious, stretching on into the night.
User avatar
Accountant
Accountant
Jack of All Trades
User avatar
User avatar
Accountant
Jack of All Trades
Jack of All Trades
Posts: 6419
Joined: May 16, 2015
Location: Wonderland

Post Post #33 (isolation #3) » Wed Apr 20, 2016 7:04 pm

Post by Accountant »

My attempt at the parenthesis problem(written in Python)

Code: Select all

def main(code):
    for all element in code:
        floor = 0
        if element = "(":
            floor += 1
        elsif element = ")":
            floor -= 1
        else:
             print "Invalid character! \n"
        return floor

print main(*)

* indicates where you should copypaste the encoded text.
There's nothing that says that a fake can't beat the real thing.

You must not imagine that for beings like you and us there can be laughter. The low men laugh, and we envy them. But for us, the higher ones, there is no laughter, only an unending vigil, purely serious, stretching on into the night.
User avatar
Accountant
Accountant
Jack of All Trades
User avatar
User avatar
Accountant
Jack of All Trades
Jack of All Trades
Posts: 6419
Joined: May 16, 2015
Location: Wonderland

Post Post #41 (isolation #4) » Thu Apr 21, 2016 2:50 am

Post by Accountant »

In my defense i wrote the damn thing on mobile while waiting for my lecture to begin.

Kagami is correct, floor = 0 has to be outside the loop. TSQ and FA are correct, it has to be ==.

No idea about is but I prefer ==
There's nothing that says that a fake can't beat the real thing.

You must not imagine that for beings like you and us there can be laughter. The low men laugh, and we envy them. But for us, the higher ones, there is no laughter, only an unending vigil, purely serious, stretching on into the night.
User avatar
Accountant
Accountant
Jack of All Trades
User avatar
User avatar
Accountant
Jack of All Trades
Jack of All Trades
Posts: 6419
Joined: May 16, 2015
Location: Wonderland

Post Post #44 (isolation #5) » Thu Apr 21, 2016 2:54 am

Post by Accountant »

Shamelessly stolen from the internet

Given an array length 1 or more of ints, return the difference between the largest and smallest values in the array.


Bonus points: don't use min() or max()
There's nothing that says that a fake can't beat the real thing.

You must not imagine that for beings like you and us there can be laughter. The low men laugh, and we envy them. But for us, the higher ones, there is no laughter, only an unending vigil, purely serious, stretching on into the night.
User avatar
Accountant
Accountant
Jack of All Trades
User avatar
User avatar
Accountant
Jack of All Trades
Jack of All Trades
Posts: 6419
Joined: May 16, 2015
Location: Wonderland

Post Post #45 (isolation #6) » Thu Apr 21, 2016 2:54 am

Post by Accountant »

Clarification: Answer above should be written as a defined function, called using an array length of one or more in its parameters.
There's nothing that says that a fake can't beat the real thing.

You must not imagine that for beings like you and us there can be laughter. The low men laugh, and we envy them. But for us, the higher ones, there is no laughter, only an unending vigil, purely serious, stretching on into the night.
User avatar
Accountant
Accountant
Jack of All Trades
User avatar
User avatar
Accountant
Jack of All Trades
Jack of All Trades
Posts: 6419
Joined: May 16, 2015
Location: Wonderland

Post Post #46 (isolation #7) » Thu Apr 21, 2016 3:01 am

Post by Accountant »

Code: Select all

def find_diff(array)
>largest = 0
>smallest = 0
>>for x in array:
>>>if x > largest:
>>>>largest = x
>>>elseif x < smallest:
>>>>smallest = x
>>>else:
>>>>print "You fucked up! Try again!"

>return largest - smallest

Another attempt at coding on mobile. Using > because tapping space four times messes with my head.
There's nothing that says that a fake can't beat the real thing.

You must not imagine that for beings like you and us there can be laughter. The low men laugh, and we envy them. But for us, the higher ones, there is no laughter, only an unending vigil, purely serious, stretching on into the night.
User avatar
Accountant
Accountant
Jack of All Trades
User avatar
User avatar
Accountant
Jack of All Trades
Jack of All Trades
Posts: 6419
Joined: May 16, 2015
Location: Wonderland

Post Post #53 (isolation #8) » Thu Apr 21, 2016 3:16 am

Post by Accountant »

I want a mish mash coding challenge
There's nothing that says that a fake can't beat the real thing.

You must not imagine that for beings like you and us there can be laughter. The low men laugh, and we envy them. But for us, the higher ones, there is no laughter, only an unending vigil, purely serious, stretching on into the night.
User avatar
Accountant
Accountant
Jack of All Trades
User avatar
User avatar
Accountant
Jack of All Trades
Jack of All Trades
Posts: 6419
Joined: May 16, 2015
Location: Wonderland

Post Post #54 (isolation #9) » Thu Apr 21, 2016 3:16 am

Post by Accountant »

If TSQ wont post it then I will
There's nothing that says that a fake can't beat the real thing.

You must not imagine that for beings like you and us there can be laughter. The low men laugh, and we envy them. But for us, the higher ones, there is no laughter, only an unending vigil, purely serious, stretching on into the night.
User avatar
Accountant
Accountant
Jack of All Trades
User avatar
User avatar
Accountant
Jack of All Trades
Jack of All Trades
Posts: 6419
Joined: May 16, 2015
Location: Wonderland

Post Post #57 (isolation #10) » Fri Apr 22, 2016 3:57 pm

Post by Accountant »

rip
There's nothing that says that a fake can't beat the real thing.

You must not imagine that for beings like you and us there can be laughter. The low men laugh, and we envy them. But for us, the higher ones, there is no laughter, only an unending vigil, purely serious, stretching on into the night.
User avatar
Accountant
Accountant
Jack of All Trades
User avatar
User avatar
Accountant
Jack of All Trades
Jack of All Trades
Posts: 6419
Joined: May 16, 2015
Location: Wonderland

Post Post #61 (isolation #11) » Mon Apr 25, 2016 8:27 pm

Post by Accountant »

That's some ugly ass code
There's nothing that says that a fake can't beat the real thing.

You must not imagine that for beings like you and us there can be laughter. The low men laugh, and we envy them. But for us, the higher ones, there is no laughter, only an unending vigil, purely serious, stretching on into the night.

Return to “Mafia Discussion”