I wrote this tiny IOS app while learning IOS coding at Ridejoy. Ridejoy is out of business, and I couldn't get an answer on the legal status of the code, so I'm posting it here.
This is a weighted credit-card-roulette app. Everyone types in what they paid, and it selects someone to pay the whole bill at random, in proportion to what they owe. Everyone pays the same on average but it's easier to figure out.