"""
Code Author: Brian Zou
Response to Wyzant Ask An Expert
"""
# our n accepts transactions for the month
n = int(input("Enter number of transactions for the month: "))
"""
we store our total, min, and max transaction in respective variables
we use 1001 as our min transaction as each min is smaller than the last
we use 0 for our max transaction as each max is larger than the last
"""
total, min_transaction, max_transaction = 0, 1001, 0
for i in range(0, n): # we ask for each individual transaction value
# p will store an individual transaction for each iteration of the loop
p = int(input("Provide the cent value of transaction #" + str(i + 1) + ": "))
if p >= 1000: # if we exceed a single transaction of over 1000 cents
print("Warning: single transaction value exceeds 1000!")
else: # as long as we don't exceed, execute the following code
if p < min_transaction: # update min to p if p is smaller
min_transaction = p
if p > max_transaction: # update max to p if p is larger
max_transaction = p
total += p # add p to our transaction total
if total >= 6000: # if we exceed the monthly transaction of over 6000 cents
print("Warning: Monthly transaction value exceeds 6000!")
else:
print("Min Transaction: " + str(min_transaction))
print("Max Transaction: " + str(max_transaction))
# to get our transaction total, we take (total / number of transactions)
print("Average Transaction: " + str(total // n))