CWU CS Code Challenge
Complete the CS monthly Code Challenge for a chance to win a fabulous prize, and be forever immortalized among your peers for being a guru problem solver extraordinaire.
Submit your answer/solution via email to jagodzinski [at] cwu.edu, with the subject Code Challenge Submission
The first correct answer and person who submitted it will be announced here. Extra creative, and/or especially unique approaches at answering the challenge, will also be posted. If your code is especially elegant, then submit it, too, so that it can be posted and marveled at.

2014

None of the submissions for the March 2014 code challenge were fully correct. The April 2014 code challenge is the same as the code challenge for March 2014. However more sample cases are given below, and the award prize has increased.

Task: Write a program or script that takes as input four coordinates from the x-y plane, and determines if those four points lie on the perimeter of a triangle, are the four corners of a square, or if the four points are random points (they neither lie on the perimeter of a triangle nor are they the four corners of a square).

For example, the following inputs generate the following outputs (the coordinate plots are shown for illustration purposes only, and your program does NOT need to generate these)

Input Output Coordinate
(0,-1)
(0,1)
(0,4)
(-1,3)
On the perimeter of a triangle

(1,1)
(3,1)
(1,3)
(3,3)
Corners of square

(0,0)
(4,0)
(0,1)
(2,1)
On the perimeter of a triangle

(0,0)
(0,-2)
(0,1)
(0,3)
On the perimeter of a triangle

(2,0)
(0,2)
(0,-2)
(-2,0)
Corners of a square

Your program should be able to receive as input the coordinates of the four points in any order. The program can receive as input the coordinate of the four points either via from the command line, or from a file. Code using any "standard" programming language will be accepted.

Prize: $30 $20 gift certificate to the CWU bookstore


2014

Task: Identify all of the words in the English language that have an even number of letters, such that the letter at index i of the word, where i is an even integer, immediately precedes alphabetically the letter that is at position i+1 of the word.

For example, one such word is STOP, because the letter S precedes the letter T in the alphabet, and the letter O precedes the letter P. However, the word LION is not one of these words, because L does not precede I, and O does not precede N. The word ABET is also not one of these words, because although A precedes B alphabetically, E is not immediately followed by T in the alphabet.

Prize: $10 gift certificate to the CWU bookstore


Winner (first correct submission)
Emily Wallen : Dictionary.java, WordList.txt

Other (not the first correct) Submissions
Andrew Smigaj : febProgrammingContestSmigajA.py
Brian Orndorff : WordCheck.java, words.txt
Josiah Langlois : challenge.py, wordsEn.txt
Anthony Porter : Driver.java