The Forum > Announcements > Python Contest 2
Is there any interest in participating in another one of these? If so, would the first Saturday of 2012 (1/7) be a convenient date? |
A point came up in the IRC channel: I haven't described the competition at all. So here goes... If you participated last time, it's mostly the same. I wrote this up to post on TwoCans, but it's also worth posting here... tl;dr:Show up at 1PM US East Coast Time, go to the contest URL below, and start writing the Python code the question asks you to. There's 10 questions, and you have 2 hours to answer as many as you can.The long version:At 10AM PST (1PM EST, 18:00 GMT), The competition will begin. The URL for the contest home page is here: http://nerdparadise.com/codecomp/You'll have to log in to NP. Use your TwoCans account. Currently the page will show the last contest and possibly a dummy test contest where I will be testing out the auto-grader making sure it works well for tomorrow. When the contest begins, a 3rd contest will appear. If you click on that, you will see the scoreboard of everyone who has successfully submitted a correct solution for a problem. (of course it will remain empty for the first few minutes) There will be a link to the problem sets, which will show links to 10 problems. Each problem page will describe a problem you will need to solve and have a place to submit your code for the answer. This part is different from last time: Last time I asked to take in input from Standard Input and send your solution to Standard Output. It will be different this time. This time you will be asked to write a function with a given name that takes a given set of inputs. For example, the problem may say "Write a function called foo that takes in 2 integers. Return the sum of these two integers." Hopefully the problems will be a little more complicated than that, but you get the idea. At the bottom of each problem set will be a place for you to submit your code. When you submit your code, it will be graded and the results will be shown on the problem listing page. The possible states are:
If your code fails, I won't be able to tell you in what way. It is up to you to figure out what went wrong based on the states listed above. I will have sample inputs and the output they should produce, but the auto-grader will be using different input. When you get an answer correct, you will appear on the scoreboard with a circle by your name. As you answer questions, you will collect more and more cirlces. The color of the circle depends on which question you solve. Each question has a different color associated with it, but you won't know what the color is until you solve it. What this means: if everyone on the scoreboard has the green circle, that's probably an easy question. If you are spending all your time on one question, then the question you're working on probably isn't the green question and it would be in your best interest to try a different question. The winner is the person who answers the most questions. Each time you answer a question, you get penalty points. The number of penalty points you get is the amount of time it took you to solve the question + the number of times you submitted a solution that wasn't correct times 600. These penalty points are ONLY used to determine the outcome of a draw. You do not get penalty points for questions you have not completed. So if it's the last few minutes of the competition and you have a solution that you're not sure if it will or won't work, SUBMIT IT. If it's correct, you'll get another circle and your rank will be impacted positively. Sure you'll get penalty points, but those only apply to break a tie with other people who also have the same number of circles you have. Make sure your submissions run on Python 2.x, NOT Python 3. The autograder is running Iron Python 2.7 which is pretty much equivalent to regular Python 2.7 as long as you don't do something wickedly bizarre. Unless I remove it by tomorrow, there'll be a drop-down menu on the submission page to let you pick the Python version you want your submission to run against. THIS MENU IS A LIE. Ignore it. Python 2.7. If you want to be sure you're up to date with the latest contest updates, or want to cheer on or boo your fellow contestants, come to #npcc on IRC on EsperNet. (the same IRC network the #TwoCans channel is on) Also just drop by if you just want to spectate. |
Discovered it was up when 17 minutes were left. I used Python like 2 months ago for the last time, but the env was luckily working at once (hello world showed up ^^). Then, I Googled everything. From how "def" works (I guessed you needed to include that in the code submission, lucky that I got this right too) to get a character from a string. Only my if statement wouldn't work... You'd think that's nearly the easiest thing you can do, but it kept throwing a syntax error at "if str[x] == '(':". I ended up using ascii values (Googling for 'python string comparison' didn't turn up anything useful, only integer comparison examples as far as I could see in a minute). In the end, I got the first problem in about 10 minutes I think. Yay! On to the next. I looked for which seemed easy and got to "As easy as counting". It seemed like a dull str_replace task so I started on it. After doing a couple (numbers 1-5, 11-15 and 100) I entered it with some hope. No luck, with 57 seconds on the clock it was incorrect. I added some more replaces, but another incorrect answer at 26 seconds, darn! I was seconds too late for the third submission. It is only now that I realise I should have removed the spaces from the input, I might have gotten it right :( It was fun though, I didn't put this in my agenda because I didn't think I would be able to solve anything. This was quite easy, just need to look a lot of stuff up, but that's great to learn the language. By the way, this is the first time I coded anything in Python which did something besides some simple hardcoded arithmetic, getting and printing input or writing helloworld. I quite like the language :) You can count me in next time! Then I'll participate from minute one :P |
Thanks to everyone who participated! Congratulations to Deckmaster, who won, followed closely by Omni. Final rankings Here are the questions If you wanted to participate but weren't able to, then don't look at the questions (honor system). I'll be re-running the same challenge in a week or two for those who want to give it a try. If you fall in that group, please ping me with 4 dates in the following 2 weeks that work well for you. |
The Forum > Announcements > Python Contest 2
