Skip to content

Pieros/HW2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

										###########################################
										##						 	  			 ##
										##   Mr.Nadtanan Praphansiri 5310613194  ##
										##						 	  			 ##
										##   Mr.Samart Pongsawat	 5310611271	 ##
										##						 	  			 ##
										###########################################
Grading:
Part 1: 100

palindrome detection
  should work for simple strings [10 points]
  should be case-insensitive [10 points]
  should ignore nonword characters [10 points]

word count
  should return a hash [5 points]
  works on simple strings [10 points]
  ignores punctuation [5 points]
  works on the empty string [10 points]
  ignores leading whitespace [10 points]
  ignores embedded whitespace [10 points]

anagram grouping
  for "scream cars for four scar creams" [10 points]
  sanity checks
    should work on the empty string [5 points]
    should return an array of arrays for nonempty string [5 points]

Part 2: 100

Dessert
  cake
    should have 400 calories [10 points]
    should be named cake [10 points]
    should be delicious [10 points]
    should not be healthy [10 points]
  apple
    should be delicious [10 points]
    should be healthy [10 points]
  can set
    calories [10 points]
    name [10 points]

JellyBean
  when non-licorice
    should contain 5 calories [5 points]
    should be named vanilla jelly bean [5 points]
    should be delicious [5 points]
  when licorice
    should not be delicious [5 points]

Part 3: 100

RockPaperScissors
  should raise NoSuchStrategyError if strategy isn't R, P, or S [10 points]
  game
    rock breaks scissors [10 points]
    scissors cut paper [10 points]
    paper covers rock [10 points]
    first player wins if both use same strategy [10 points]
  tournament
    base case [20 points]
    recursive case [30 points]

Total: 300
Late: 0 day
Deduction: 0
Final Score: 300/300

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages