BlackJack I


Collapse Content

You're writing a program to play a BlackJack variety and need to write a method to handle the score.

In general, given two numbers, a and b, return their sum. However, if the sum is greater than 21, return 0 instead (since the player has "gone bust").

blackjack-cards

Image from Wikipedia

Challenge

Return the score of two blackjack 'cards', as described above. (The numbers can be from 1-13).

Please sign in or sign up to submit answers.

Alternatively, you can try out Learneroo before signing up.

Comments

All Node Comments
Contact Us
Sign in or email us at [email protected]