# Arup Guha
# 9/24/2020
# While Loop Example: Collecting Donations until a goal is reached.
# Version 3: Differentiates between 0 donations and actual donations.

# Get goal amount.
goal = int(input("How many dollars would you like to raise?\n"))

# Right now we have no money.
total = 0

# Keep track of how positive donations we get.
numDonations = 0

# Keep track of how many people stiffed us!
numZeroes = 0

# Keep on collecting until we reach or exceed the goal.
while total < goal:

    # Get the donation.
    money = int(input("How much are you donating?\n"))

    # This is an actual donation - update accumulators, give a nice comment.
    if money > 0:
        total = total + money
        numDonations = numDonations + 1
        print("We truly appreciate your donation of",money,"dollars.")

    # Snarky comment for people who stiffed us, and update our accumulator.
    else:
        numZeroes = numZeroes + 1
        print("Sorry you don't have it in your heart to help a poor band kid!")

# Print out how much collected.
print("You collected",total,"dollars after asking for",numDonations+numZeroes,"donations.")

# Print out average donation.
print("Of actual donations given, the average donation was",total/numDonations,"dollars")

# Print out zeroes.
print("Also,", numZeroes," people were mean and didn't give us any money!")
