"Programming? What's that?" edition
RULES:
Pick a challenge between 0-99, do it as quickly as possible and make your code as small and efficient as you can in the language of your choosing. Post code when you're done!
And don't forget, Have fun!
===========================
Other links:
V1.4(Pretty much 3.0, but with a few different challenges)
http://www.mediafire.com/view/qaduzz1a83zu4j1/Programming_1.4.png
>>55632664
Lmao, some of these I'm just thinking "yeah I could probably get that done in 30 minutes or so" then others I'm thinking "Holy shit I never want to roll this. That would take ages." What's a single algorithm challenge compared to writing a 3d FPS game for example? That's of course assuming I'm doing both from nothing but very basic tools.
That said, rollan
BIG MONEY BOB
hit me
>>55633462
[quote]
def luhn(numbers):
# inputs:
# numbers- list of numbers
check_d = numbers[-1]
n = len(numbers)
for i in range(n):
if (i+1) % 2 == 0:
index = n -1 - i
numbers[index] = numbers[index]*2
numbers = map(lambda x: sum(str(x).split("")) if x >= 10)
check = (9*sum(numbers[:-1])) % 10
if check = check_d:
return True
else:
retrun False
>>55633828
it's [ code ][ /code ] senpai
>>55633828def luhn(numbers):
# inputs:
# numbers- list of numbers
check_d = numbers[-1]
n = len(numbers)
for i in range(n):
if (i+1) % 2 == 0:
index = n -1 - i
numbers[index] = numbers[index]*2
numbers = map(lambda x: sum(str(x).split("")) if x >= 10)
check = (9*sum(numbers[:-1])) % 10
if check = check_d:
return True
else:
retrun False
I fucked up. reroll
Chdjxnskis
ayyy
(why the fuck not)
I believe this is called golf
>>55632664
dickbutt. This better not be FizzBuzz.
>>55632664
rolling