Skip to content

Instantly share code, notes, and snippets.

View SoxFace's full-sized avatar

Sonya SoxFace

View GitHub Profile
@SoxFace
SoxFace / demo.md
Last active August 29, 2015 14:13 — forked from wofockham/demo.md

Scrabble Score

Write a program that, given a word, computes the scrabble score for that word.

Scrabble.new.score("cabbage")
# => 14

Your program should be in a file named scrabble.rb.

@SoxFace
SoxFace / grandma.md
Last active August 29, 2015 14:13 — forked from epoch/grandma.md

Grandma

Write a Deaf Grandma program.

Whatever you say to grandma (whatever you type in), she should respond with

HUH?! SPEAK UP, SONNY!

unless you shout it (type in all capitals).

@SoxFace
SoxFace / anagram.md
Last active August 29, 2015 14:13 — forked from epoch/anagram.md

Anagram Detector

Write a program that, given a word and a list of possible anagrams, selects the correct one(s).

In other words, given: "listen" and %w(enlists google inlets banana) the program should return "inlets".

@SoxFace
SoxFace / school.md
Last active August 29, 2015 14:14 — forked from epoch/school.md

Grade School

Write a small archiving program that stores students along with the grade that they are in.

school = School.new("Haleakala Hippy School")

If no students have been added, the db should be empty:

@SoxFace
SoxFace / say.md
Last active August 29, 2015 14:14 — forked from epoch/say.md

Say

Write a program that will take a number from 0 to 99 and spell out that number in English.

In other words, if the input to the program is 22, then the output should be 'twenty-two'

e.g.

Say.new(22).in_english
@SoxFace
SoxFace / bob.md
Last active August 29, 2015 14:14 — forked from epoch/bob.md

Bob

Bob is a lackadaisical teenager. In conversation, his responses are very limited.

He answers 'Sure.' if you ask him a question. He answers 'Whatever.' if you tell him something. He answers 'Woah, chill out!' if you yell at him (ALL CAPS). He says 'Fine. Be that way!' if you address him without actually saying anything.

Write Bob so that you can have an interactive conversation with him.

@SoxFace
SoxFace / quiz_dice.md
Last active August 29, 2015 14:14 — forked from epoch/quiz_dice.md

Quiz - Dice

Write a program to generate a standard dice roll.

Dice.roll
# => 6

It should give you a different result each time.

@SoxFace
SoxFace / 0_reuse_code.js
Last active August 29, 2015 14:15
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console