Comp 115 Programming Assignment 01: Changemaker

Due 11:59pm Friday, February 14 2019

You are required to work on this lab in teams of two. You must complete this lab with your teammate only, although you may discuss lab concepts with other students. Please keep the Academic Integrity Policy in mind---do not show your code to anyone outside of the professors and tutors, and do not look at anyone else's code for this lab. If you need help with the assignment or have trouble finding a teammate, please post a question/request on Piazza, or contact the professor.

In this project, you will practice computing with numbers. I kept it reasonably short, and you should be able to complete it using only input, output and mathematical operations. Save your code in a file whose name consists of the first letter of your first name followed by your last name and Prg1. For example, if I submitted an assignment, I would name the file mgagnePrg1.py.

The Problem

The president of the Republic of Bananaria decreed that, from now on, the country's mint will produce the following coins: a 1¢ coin, a 3¢ coin, a 11¢ coin, a 33¢ coin, a 99¢ coin and a 363¢ coin.
(Bananas are mildly radioactive, clearly the president ate a few too many...)

These coins weight 2 grams, 3.4 grams, 5.4 grams, 6.3 grams, 7.1 grams and 8.3 grams respectively (with the heavier coins being the ones that are worth most). The poor citizens of Bananaria are asking you to write a program that will help them determine how many of each coin they should use to give an amount of money, and the total weight of the coins they are giving away.
(I do not really know why they want the weight as well, they probably also eat a lot of bananas...)

Input

Your program should ask the user for the amount of money to give away. The amount should be a floating-point number with two decimals. Your can assume that the user enters an amount that makes sense, your program is not required to do anything meaningful on invalid input.

Output

Your program should display on screen the number of each coin to give away, as well as the total weight of the coins you gave away. The output should be in the form of an aligned table that contains the same information as the following:

               Number      Value      Weight
363¢ coin          27      98.01       224.1
 99¢ coin           2       1.98        14.2
 33¢ coin           1       0.33         6.3
 11¢ coin           1       0.11         5.4
  3¢ coin           2       0.06         6.8
  1¢ coin           1       0.01         2.0
--------------------------------------------
Totals:            34     100.50       258.8

All the values must be right justified, with decimals aligned. All dollar values should be shown with two decimals and all weights should be shown with one decimal.

Your table does not have to look exactly like the one above, but you should do your best to make your output as similar to the above as possible. In addition, all the columns should be wide enough to accommodate the answer for an amount up to 1000000.00

Specifics