[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
/pcg/ Pro/g/ramming Challenge General
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 13
Thread images: 1
File: Pro:g:ramming 3.0WithDifficulty.png (1 MB, 3840x2160) Image search: [Google]
Pro:g:ramming 3.0WithDifficulty.png
1 MB, 3840x2160
"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
>>
>>55633828
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

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
Thread replies: 13
Thread images: 1

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.