id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

andersoniii.edwin@cusd80.com week9 > goFish
prev  |  next  |  chance

In the extraordinary fun card game "Go Fish" a player asks another player if he/she has a certain type of card. Do you have any "twos"? The other player searches their hand and either says "Yes" or "Go Fish". Take the roll of the responding player. Write the method to check your "hand of cards" which you will receive as a string array. You will also receive a string for the opponents guess. Sample string array "1", "2", "3", "J" meaning you have Ace, Two, Three, and a Jack.


goFish(["A", "2", "3", "J"], "A") → "Yes"
goFish(["A", "2", "3", "J"], "K") → "Go Fish"
goFish(["2", "10", "7", "Q"], "Q") → "Yes"

...Save, Compile, Run (ctrl-enter)

public String goFish(String[] cards, String guess) }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 155

Copyright Nick Parlante 2017 - privacy