Skip to content

wisetara/3.1FizzBuzzWhatNot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FizzBuzzWhatNot

Epicodus Week 3 Day 1 - Fizzbuzz, title case, allergies

Fizzbuzz To start off our first week of Ruby, write a method in Ruby that takes a number and returns an array of numbers and strings that correspond to the Fizzbuzz solution (i.e., fizzbuzz(7) returns [1, 2, 'fizz', 4, 'buzz', 'fizz', 7]). Use RSpec and the BDD process, of course.

Title case To keep easing into things, let's revisit the Title Case problem from the other week. As a reminder, make sure your code can handle inputs in all lowercase, all uppercase, a mix of different cases, one word, multiple words, and anything else you can think of.

Allergies Here's something a bit trickier. An allergy score is a single number that tells what someone is allergic to. The scores for each allergen are:

allergen score eggs 1 peanuts 2 shellfish 4 strawberries 8 tomatoes 16 chocolate 32 pollen 64 cats 128 So if someone is allergic to eggs and strawberries, they get a score of 9.

Write a method that takes someones score as an argument, and returns an array listing what they're allergic to.

Poker hand Write a method takes an array of cards, represented by letters and number, as an argument, and returns the poker hand the cards represent. For example, poker_hand(['2S', '3C', '4D', '5C', '6H']) would return 'straight'.

About

Epicodus Week 3 Day 1 - Fizzbuzz, title case, allergies

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages