Table of Contents
The project emulates a game in which two scenarios are possible: either the user wins or loses. The user will be prompted to enter whether he/she would like to play. If the user would like to play, he/she will be prompted to enter an amount of money. Then, the user will have to try to match that amount of money by telling the program how many half dollars, quarters, dimes, ect. would be needed to match that previous amount. If the monetary value of all the coins summed up equals the initial amount, the user wins; otherwise, the user loses the game.
The objective of this program is to demonstrate the following:
- practice writing a short Python program
- utilize conditional statements to guide course of program via set conditions
- display knowledge of basic Python arithmetic
This program assumes that the user will enter a valid input each time the program requests any integer/float values. The program's output will result in unknown behavior if anything other than an integer or float value is entered by the user. The program will also be aborted if any input value is a number less than zero. The program will also assume that the amount of money that the user would like to match will be a float value with no more than two decimal places.
To run the program, download the contents of the project and simply run make in the terminal.
Name: Garrett Ellis
Project Link: https://github.com/Python-Coding-Assignments/Coin-Game