Skip to content

Instantly share code, notes, and snippets.

@anishthite
Created February 7, 2022 00:27
Show Gist options
  • Select an option

  • Save anishthite/6c97ea111774820bddc95442f178e747 to your computer and use it in GitHub Desktop.

Select an option

Save anishthite/6c97ea111774820bddc95442f178e747 to your computer and use it in GitHub Desktop.
fuck splitwise
d = {'a': 0, 'n': 0, 'v': 0, 's': 0, 'd': 0}
while True:
p = input("enter price(x for done, else input number as float): ")
if p == 'x':
print(d)
break
p = float(p)
people = input('Enter letters for people (no delim): ')
splitprice = p / len(people)
for i in people.lower():
d[i] += splitprice
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment