def min_payment():
''' Calculates the minimum payment due on credit card
depending on the credit card balance'''
print("Tiny National Bank of Walterville")
print("Credit Card Payments")
balance = float(input("Please enter Credit Card Balance"))
print("Credit Card Balance: " ,round(float(balance), 2))
min1 = 12.00
min2 = round(.027 * balance, 2)
if min2 > min1:
print("Minimum payment due: ", min2)
elif balance <= 0:
print("No payment due")
elif balance < min1:
print("Minimum payment due: ", balance)
else:
print("Minimum payment due: ", min1)
If anyone can tell me how to loop that so I can repeat it based on user input, that would be very helpful. I basically want it to say something like this "Another customer (y or n)? "
Asking for the user to select y or n. Also please dont be too critical of the actual code. Im still learning. Its python by the way. Thanks!