JPMorganChase interview question

Hackerrank question was coding up Blackjack