#  (Programming: 8 points) A utility company charges based
#   on the number of units a customer uses in a month.  For the first
#   100 units there is no charge; the next 100 units cost $0.05 per
#   unit; for usage above 200 units, the cost is $0.10 per unit.  Write
#   code you could put into file utilityBill.py that does the
#   following: accept from the user an integer number of units, compute
#   and report the total bill.  Show the bill with dollar sign and two
#   digits after the decimal point. Assume the input is an integer, but
#   print an error if it's negative.  Some sample behavior is below:
#
# > python utilityBill.py
# Report usage units: -17
# Negative value entered.
# > python utilityBill.py
# Report usage units: 99
# You pay: $0.00
# > python utilityBill.py
# Report usage units: 155
# You pay: $2.75
# > python utilityBill.py
# Report usage units: 275
# You pay: $12.50
# > python utilityBill.py
# Report usage units: 1000
# You pay: $85.00

units = int( input( "Report usage units: " ))
if units < 0:
    print( "Negative value entered." )
else:
    if units <= 100:
        cost = 0.0
    elif 100 < units <= 200:
        cost = 0.05 * (units - 100)
    else:
        cost = 100 * 0.05 + (units - 200) * 0.10
    print( "You pay: $", format( cost, ".2f" ), sep = "")

