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

 

andersoniii.edwin@cusd80.com > findFaceCards
prev  |  next  |  chance

In a given hand of standard playing cards, write the method to determine the number of "face cards" - Remember a face card is a "Jack", "Queen", and "King". Our program will just denote the first letter. The input to the method findFaceCards will be a String array and the output will be the integer count of face cards. Sample ["CQ","DQ","S8","S10","HK"] would return 3


findFaceCards(["CQ", "DQ", "S8", "S10", "HK"]) → 3
findFaceCards([]) → 0
findFaceCards(["CQ", "D8", "S8", "S10", "HA"]) → 1

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

public int findFaceCards(String[] cards) }

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: 140

Copyright Nick Parlante 2017 - privacy