For this project, you will learn and report on a programming language. You will have to install a compiler/interpreter for the language and learn it on your own.
You will write a paper on the language, as well as a program in the language. You will also turn in a rough draft of the paper.
The following table lists some languages that would be a good choice If you prefer to study a language not listed, just ask. No more than five people can report on the same language. Email me when you decide which language you choose.
|CoffeeScript||Colin, Noor, John, Dominic, Matt|
|Go||Tyler F., Phillip|
|Lua||Alex, Savannah, Ashley, Joe, James|
|R||Thomas S., Chris H.|
|Ruby||Austin, Chris R., Peter, Ruth, Tyler H., Carlson|
|Swift||Chris Z., Shehan, Ryan, Harry, Roylando|
Your paper should touch on the following subjects:
The paper should include code samples to highlight particular features of the language.
To get experience working with your language, you will write a program that allows the user to play blackjack. In the game of Blackjack, players are dealt cards and try to get a hand of cards that scores as close to 21 as possible without going over. Cards are scored as follows:
|Ace||11 or 1|
Aces are scored as 11 or 1 based on what is better for the player. If counting an ace as 11 keeps the player under 21, it will count as 11, otherwise, it will count as 1. For example, if the player has the cards Queen, Ace, and 9, then their score will be 20.
If the player has the cards King and Ace, then their score will be 21. A score of 21 is also called "blackjack".
Your program should give the user two random cards, and ask if they want to hit (receive a new card) or stay. At each step, you should display their cards (number and suit). You should keep asking them this until they either choose to stay or get a score over 21.
You should then print out the numerical score. If the score is 21, you should print 'Blackjack!', if the score is over 21, you should print 'Bust!'.
You don't need to provide a way for the user to play multiple games.
Copyright © 2018 Ian Finlayson | Licensed under a Creative Commons Attribution 4.0 International License.