Skip to content
Code To Live By » Java Tutorial » Coding Challenges Part II

Coding Challenges Part II

  • by

This concludes what I am tentatively calling the “beginner’s Java tutorial.” We have gone over a lot of concepts which I think should provide a strong foundation to furthering your development skill-set and allow you to begin solving problems through code.

I am again providing a list of coding challenges to help cement what you have learned so far. You can do as many or as few as you like, but I would encourage doing at least one.

Play By Play

Download the 2019 NFL Play by Play data as a csv from NFL Savant here.

Which team had the most rushing yards on offense in the 2019 regular season?

To word it slightly differently for those of you not familiar with American football: Which team on offense, had the most yards on rushing plays that did not have penalties accepted?

Blackjack

Write a program that can play the card game Blackjack.

To briefly summarize the game, the objective of the game is to get the closest to 21 without going over. Number cards are worth their number in points, Face cards are worth ten points, and the Ace can be worth either 1 or 11 points.

We will put some additional constraints on the game for our purposes:

  • The game can be between the player and the dealer, you don’t need to worry about additional players at the table.
  • You don’t need to worry about tracking any sort of betting, a simple “You win / lose” is enough for us here.
    • Since we aren’t doing any sort of betting you can ignore “side bet” rules such as splitting and insurance.
  • The Dealer “AI” can be to take additional cards as long they have a lower score than the player, and neither has busted.

Leave a Reply

Your email address will not be published. Required fields are marked *