2008 Scripting Games – Solution for Beginner’s Event 8 (and 7)
This continues my series of solution posts for the 2008 Scripting Games with my solution for the Beginner’s Event 7 and Beginner’s Event 8. I’m wrapping them together because beginner’s event 7 was just a debugging exercise so I just pasted the solution at the bottom1. Event 8 was the age old “Higher or Lower” [...]
2008 Scripting Games – Solution for Beginner’s Event 6
This continues my series of solution posts for the 2008 Scripting Games with my solution for the Beginner’s Event 6. This was actually the script that got me started solving the beginner scripts — someone asked about it in the first couple days of the scripting games, and it got me interested. The challenge was [...]
2008 Scripting Games – Solution for Beginner’s Event 5
This continues my series of solution posts for the 2008 Scripting Games with my solution for the Beginner Event 5 which was a simple test of your ability to accept command-line parameters and play with dates. The only real trick was that you were required to calculate the number of months and days two different [...]
2008 Scripting Games – Solution for Advanced Event 6
This continues my series of solution posts for the 2008 Scripting Games with my solution for the Advanced Event 6. This was an interesting challenge because it’s a basic algorithms test … Mow, the scripting guy came up with some interesting brute-force solutions … but nearly everyone else just implemented the Sieve of Eratosthenes, since [...]
2008 Scripting Games – Solution for Advanced Event 5
This continues my series of solution posts for the 2008 Scripting Games with my solution for the Advanced Event 5 which was a joke of a challenge — basically you have to run an arbitrary set of password “strength” rules over a string. The rules are not very complete, and result in such vagaries as [...]
2008 Scripting Games – Solution for Advanced Event 4
This continues my series of solution posts for the 2008 Scripting Games with my solution for the Advanced Event 4 which was about drawing a “graphical” calendar in the console. Basically, this is a simple task, and the only complication was the requirement to allow passing in the month. There are solutions from the Scripting [...]
2008 Scripting Games – Solution for Advanced Event 3
This continues my series of solution posts for the 2008 Scripting Games with my solution for the Advanced Event 3 which was about counting votes in an instant run-off election. The idea was to take a CSV file with lines representing “ballots” such that each ballot should be a list of four candidates in order [...]
2008 Scripting Games – Solution for Advanced Event 2
This continues my series of solution posts for the 2008 Scripting Games with my solution for the Advanced Event 2 which was about scoring a skating contest. The idea was to take a CSV file with skater names and scores (7 per skater), and calculate the average (leaving off the highest and lowest) score for [...]
2008 Scripting Games – Solutions for Beginner Events 3 and 4
In my ongoing chronicle of solutions to the 2008 scripting games events … the task in beginner’s event 3 was to copy the first line of each text file in a folder into a new text file. This task is so trivial in PowerShell that my solution is the same as the Scripting Guy’s: get-content [...]
2008 Scripting Games – Solutions for Advanced Event 1
Right up front I should apologize to anyone who’s not a PowerShell user, because it’s just become clear to me that for the rest of the scripting games, I’m going to be posting my solutions to most, if not all, of the puzzles. I thought for sure that I wouldn’t have any reason to post [...]