Login Register


100 Program Challenge..For everyone filter_list
Author
Message
100 Program Challenge..For everyone #1
Hey all, I am slowly starting to work on 4-chans program challenge at my website again, but I figured I'd post the actual challenges here and see what happens


[Image: LthawgP.png]

that's it. Use whatever language you want. This isn't so much who will win or the best solution, but what you guys can do and a collaborative learning effort. Collab with others if you want, the point is to learn something new.
For example, when I'm trying to learn a new language I randomly choose a few of these to do, and come out with a greater understanding and a few tips/tricks up my sleeve.

The last two numbers of your post count is your assignment

GO

I'll be doing 35, which is my post-count before I posted this. 36 later since that's my post count when I posted this. I'll be using C | Python respectively

P.S
This is from 4chan
[Image: pBD38Xq.png]
Email: insidious@protonmail.ch

Reply

RE: 100 Program Challenge..For everyone #2
Are #'s 29 or 30 something I would be able to watch a few video tutorials on and try to jump in it balls deep? I would be interested in trying this but would need a nudge in the right direction.

Reply

RE: 100 Program Challenge..For everyone #3
There are some nice challenges here! I will attempt a few tonight! This would be good for people who are trying to start a specific language and want to learn in a more practical way.

Reply

RE: 100 Program Challenge..For everyone #4
Totally not doing all of them as we speak..

(also, tag this thread with the serenity prefix)
It's often the outcasts, the iconoclasts ... those who have the least to lose because they
don't have much in the first place, who feel the new currents and ride them the farthest.

Reply

RE: 100 Program Challenge..For everyone #5
(05-13-2016, 08:56 AM)Slacker Wrote: Are #'s 29 or 30 something I would be able to watch a few video tutorials on and try to jump in it balls deep? I would be interested in trying this but would need a nudge in the right direction.

Hellya man. It's great for learning new things, and 29/30 shouldn't be too bad for getting your feet wet. Just keep going once the goings get tough, and you'll make it out alive.


(05-13-2016, 09:04 AM)Mafia Wrote: There are some nice challenges here! I will attempt a few tonight! This would be good for people who are trying to start a specific language and want to learn in a more practical way.

Thanks man haha.

And yeah I use these challenges alot when I'm trying to learn a new language. I grab a few random ones and get to it, and it gives me a pretty good idea of the strengths/weakness' of the langauge, as well as getting me acclimated to it.

(05-13-2016, 11:56 AM)Inori Wrote: Totally not doing all of them as we speak..

(also, tag this thread with the serenity prefix)

I'll want to see the result of that! Tongue

(tagged Wink)
[Image: pBD38Xq.png]
Email: insidious@protonmail.ch

Reply

RE: 100 Program Challenge..For everyone #6
Like I haven't messaged with this at all before that's why I was asking.

Reply

RE: 100 Program Challenge..For everyone #7
I'll try and do Hangman. Biggrin
[Image: 7ajmN5P.jpg]

Telegram: Oni_SL (Link)

[+] 1 user Likes Oni's post
Reply

RE: 100 Program Challenge..For everyone #8
(05-13-2016, 11:16 PM)Oni Wrote: I'll try and do Hangman. Biggrin

Spoiler: python version
Code:
from random import randint from os import system def cls(): if __import__('os').name=="nt": system('cls') else: system('clear') words=["animal","vast","brilliant","exit","passenger","binding","loyal","cold","generation","cruise","abstract","raspberry","prime","red","episode","forgotten","dust","virgin","alien","focus","tactic","cut","pink","skin","goggles","crawling","heart"] word=list(words[randint(0,len(words)-1)]) disp=['_']*len(word) left=12 guessed=[] while left>=0: cls() print("Guesses left:\t "+str(left)+"\nAlready guessed:",', '.join(guessed),"\nProgress:\t",' '.join(disp),"\n\n") guess=input("Guess a letter: ") while guess in guessed or len(guess)>1: guess=input("Invalid option. Choose another letter: ") guessed.append(guess) if word.count(guess)>0: for i in range(len(word)): if word[i]==guess: disp[i]=guess if disp==word: print("\nYou Win! The word is "+''.join(word)) exit() else: left-=1 print("Out of guesses, you lose. The word was "+''.join(word))
It's often the outcasts, the iconoclasts ... those who have the least to lose because they
don't have much in the first place, who feel the new currents and ride them the farthest.

[+] 1 user Likes Inori's post
Reply

RE: 100 Program Challenge..For everyone #9
Made the currency program in Python. Used an API b/c i have not really used API's much (never in Python) before and wanted to learn a bit more about how they work since they are extremely useful...

Code:
import json import urllib3 import sys #this is my first time using API :D http = urllib3.PoolManager() r = http.request('GET','http://api.fixer.io/latest?base=USD') with open('result.json','wb') as out: out.write(r.data) r.release_conn() with open('result.json') as data_file: data = json.load(data_file) while True: rate = input("Enter the rate you would like to see, in official format (or :q to exit..)EX: PLN or USD: ") if (rate == 'USD'): multiplier = input("Enter how much in USD you would like to convert to chosen currency: ") print("%d %s is %d %s" % (int(multiplier), 'USD', int(multiplier), 'USD')) elif(rate == ':q'): sys.exit(0) else: try: convRate= data['rates'][rate] multiplier = input("Enter how much in USD you would like to convert to chosen currency: ") print("%d %s is %d %s" % (int(multiplier), 'USD', convRate * int(multiplier), rate)) except KeyError: print("Whoops! That was not a valid format. Try Again...")
[Image: pBD38Xq.png]
Email: insidious@protonmail.ch

Reply

RE: 100 Program Challenge..For everyone #10
le rolling fur dubbles!!!!!!!!!

(I got 62 and will update this post when le done)

Reply







Users browsing this thread: 1 Guest(s)