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

/pcg/ Pro/g/ramming Challenge General

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 13
Thread images: 1

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


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

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
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.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.