Navigation

First Quarter

3n+1

Source Code

Input/Output

$ python hailstone.py 20 50 20 50 112

Minesweeper

Source Code

Input/Output

$ java Minesweeper 4 4 *... ..*. .*.. ...* Field #1 *211 23*1 1*32 112*

L(L) language

Source Code

Input/Output

$ python parentheses.py String: public class Foo { public static void main(String[] args) { System.out.println("Hello World!"); } } YES!

Clock patience

Source Code

Input/Output

$ python patience.py TS QC 8S 8D QH 2D 3H KH 9H 2H TH KS KC 9D JH 7H JD 2S QS TD 2C 4H 5H AD 4D 5D 6D 4S 9S 5S 7S JS 8H 3D 8C 3S 4C 6S 9C AS 7C AH 6H KD JC 7D AC 5C TC QD 6C 3C # 44,KD $ java Patience 44,KD

Slurpy Grammar Parser

Source Code

Input/Output

$ python slurpy.py ?ADFGCDFFFFG ACCEPT

Smalltalk - Tiled pyramids

Source Code

Input/Output

Tiled Pyramids

Smalltalk - Tree using recursion

Source Code

Input/Output

Recursive Tree

Smalltalk - Spiral using squares

Source Code

Input/Output

Square Spiral

Scheme - Assorted Functions

Source Code

Input/Output

> (convert3 5 2 8) 825 > (volume-cylinder 10 24) 7539.816 > (area-cylinder 10 24) 2136.2812000000004 > (area-pipe 10 24 .2) 3046.0856639999997 > (rocket-height 10 60) 18000.0

Scheme - Tiled pyramids & Checkerboard

Source Code

Input/Output

Pyramid

Scheme - Spiral

Source Code

Input/Output

Square Spiral

Scheme - Matricies

Source Code

Input/Output

> (write-vector-file "v1.txt" 10) > (write-vector-file "v2.txt" 10) > (read-vector-file "v1.txt") #10(34 58 39 10 31 39 47 21 88 87) > (read-vector-file "v2.txt") #10(96 86 88 74 96 98 93 41 83 42) > (add-vectors (read-vector-file "v1.txt") (read-vector-file "v2.txt")) #10(130 144 127 84 127 137 140 62 171 129) > (dot-product (read-vector-file "v1.txt") (read-vector-file "v2.txt")) 1251 > (write-matrix-file "matrix1.txt" 2 2) > (write-matrix-file "matrix2.txt" 2 2) > (read-matrix-file "matrix1.txt") #2(#2(45 33) #2(49 23)) > (read-matrix-file "matrix2.txt") #2(#2(69 50) #2(4 65)) > (mult-matricies (read-matrix-file "matrix1.txt") (read-matrix-file "matrix2.txt")) #2(#2(3237 4395) #2(3473 3945)) > (add-matricies (read-matrix-file "matrix1.txt") (read-matrix-file "matrix2.txt")) #2(#2(114 83) #2(53 88))

Second Quarter

C - Matricies

Source Code

Input/Output

C Results

$ ./a.out Reading first matrix... Reading second matrix... Starting matrix multiplication... Ending matrix multiplication. Time = 3 sec, 893282 microsec Reading solution product... Check matrix multiplication... Congratulations, you agree with my answer

Fortran - Matricies

Source Code

Input/Output

$ ./a.out Reading first matrix from file... Reading second matrix from file... Starting matrix multiplication... begin (date_and_time): 47059.691000 End matrix multiplication end (date_and_time): 47061.376000 Total time= 1.685000000055879 Reading product matrix solution from file... Same = 1 Your answer agrees with mine

Image Editing

Source Code

Input/Output

$ ./a.out Picture read. Horiz Edge data generated read. Horiz picture written. Picture read. Vert Edge data generated read. Vert picture written. Picture read. Cross Edge data generated read. Cross picture written. Picture read. Sobel Edge data generated read. Sobel picture written.

Tripod Horizontal Edges Vertical Edges Cross Edges Sobel Edges

OpenGL - Pong

Source Code

Application

Input/Output

Pong Screenshot

ML

Source Code

Input/Coutput

- use "mlWork.ml"; [opening mlWork.ml] val check = fn : int -> bool val average = fn : int * int -> real val positive = fn : (real -> real) * real -> real val duplicate = fn : string -> string val f = fn : int -> int val sum = fn : int * (int -> real) -> real val sumix = fn : int * (int -> int) * (int -> real) -> real val findmax = fn : int * int -> int val maxfactor = fn : int -> int val it = () : unit

dschafer is a rankmaniac