Just wanted to know let's say Person 1: Paid 66USD Person 2: Paid 0USD Person 3: Paid 33USD
How do I program it in a way that it sends a table that tells person 2 has to pay 33USD TO person 1 to settle an equal balance amongst all members?
print('How many people in total')
people_num = int(input())
#Get the name list of everyone
name_list = []
for num in range(0,people_num):
print("What are their names?")
name_list.append(input())
print(name_list)
#get the amount everyone paid
amount = []
for name in name_list:
print("How much did " + name + " pay?")
amount.append(float(input()))
total_amount = sum(amount)
print(total_amount)
#create empty dictionary to calculate how much one person has to pay or receive
owe = []
for x in amount:
owe.append(round(x - (total_amount/people_num),2))
info = {}
for name, amt_owe in zip(name_list,owe):
info[name] = amt_owe
print(info)```